TST: Add layout tests for boxplot

Added `layout` test cases related to #7035, changing `_check_axes_shape` logic to meet with #7096.