Move all manifest validation logic to /addon/lib/validator.js and unit test it.

So I looked at differences between gecko18 and m-c on PermissionTables and AppsUtils and the result is that:
  * there is no differences for AppsUtils
  * only one commit, that should ideally be uplifted on PermissionTables - http://hg.mozilla.org/mozilla-central/rev/01f0d7b85857

Given that, it would be really easier and less error prone to move all validation logic to the addon. It may save us from races involved in this complex asynchronous code.

Also, it highlights that we are doing the same check twice.
The main fact that prevent sharing validation code is that the platform code is extremelly bad at reporting what is going wrong. It just returns false and sometimes tries to print something to the console.
Speaking about developer tools, we should aim to fix that at the source and improve error reporting when installing an App. By doing so, I think we should be able to reuse the validation logic being involved in the platform in order to execute some check before installing the app.