Support for toggling between horizontal/vertical tab placement

Added support for toggling between horizontal and vertical tab modes.
Currently it supports only left and top tab placements.

The current behaviour is as follows :

* Expands all the tabs when switching from vertical tab placement to
horizontal tab placement.
* Restores the tab hierarchy when switching back to vertical tab
placement.

fix for issue #2 
In the case of `if`, we need the check as we need to add appropriate spacing before hididng it, but in case of the `else` condition we can directly set empty border as we don't need space for collapse button. Hence not checking for it.