Compute the best size of the notebook, taking into account all the different layout possibilities, and add a test checking that this works as expected. Closes https://github.com/wxWidgets/wxWidgets/pull/1085