Refactor _removeAdminMenus

Changes:
* Pass only the extension ID, not the entire extension row. After all, only the ID is used!
* Always run rebuild() on the menus table, preventing broken nested sets on this table (now you know why this table breaks all the time)
Type hinting
Improve JInstallerAdapterComponent::_buildAdminMenus

Changes:
* Type hinting for $table
* There can be more than one root menu items for a single component if the installation previously failed without rollback (e.g. timeout error)
* The extension ID must always be fetched from the #__extensions table, not the old menu items for the same reasons as above
* Just do not create the menu if $menuElement not exist (it was a TODO item for as long as I remember developing for Joomla!)
* Unnecessary code duplication creating the root menu item
* Refactored the code, moving the actual menu item creation in the _createAdminMenuItem method
* If a submenu already existed with the same parent item the installation would fail. Now we try removing it first, just like we do for the root menu item.
Remove duplicated extension_id records on install / discover_install

If there's a timeout or PHP fatal error during a component's installation there are invalid records left behind in #__extensions and #__menus which prevent further installations. We now detect them and remove them to let the installation proceed.
Simplify the admin menu building
Make travis Happy for https://github.com/joomla/joomla-cms/pull/5499

Hi @nikosdion

this should make travis happy here: https://github.com/joomla/joomla-cms/pull/5499

```
FILE: ...s/build/joomla/joomla-cms/libraries/cms/installer/adapter/component.php
--------------------------------------------------------------------------------
FOUND 8 ERROR(S) AFFECTING 8 LINE(S)
--------------------------------------------------------------------------------
 1141 | ERROR | Tabs must be used to indent lines; spaces are not allowed
 1142 | ERROR | Tabs must be used to indent lines; spaces are not allowed
 1143 | ERROR | Tabs must be used to indent lines; spaces are not allowed
 1255 | ERROR | Tabs must be used to indent lines; spaces are not allowed
 1256 | ERROR | Tabs must be used to indent lines; spaces are not allowed
 1257 | ERROR | Tabs must be used to indent lines; spaces are not allowed
 1258 | ERROR | Tabs must be used to indent lines; spaces are not allowed
 1878 | ERROR | Expected 2 spaces after the longest type
--------------------------------------------------------------------------------
```
Merge pull request #8 from zero-24/patch-25

Make travis Happy for https://github.com/joomla/joomla-cms/pull/5499
Cleaning up the router of com_wrapper
Merge pull request #5510 from Hackwar/com_wrapper_router

Cleaning up the router of com_wrapper
complete rebuild of Icon Spacing PR
Merge pull request #5512 from N6REJ/Icon_Spacing

complete rebuild of Icon Spacing PR
Merge pull request #5499 from nikosdion/fix/admin_menus_install

JInstallerAdapterComponent bug fixes related to admin menu build
Revert #1273 as you couldn't save items