Fix permissions tests

This moves to getting a list of permissions from the device and using that to test rather than using hand written tests for each permission.

Using PermissionSettingsModule.addPermission() bypasses PermissionsTable.jsm checks for app type, so it doesn't make sense to test the affect of setting the permissions to 'allow' for each app type. Instead, I'm using getPermission to read the default values for each permission for each app type, but only running addPermission once for each permission.
I run the recursive 'getTheNames' function on window, so any permission that ends up adding something to the window (or window.navigator) objects will be tested that way. I get a baseline with no permissions set and then diff the results against the baseline for each permission. This would have been clearer if I had remembered to add the expected results for the permissions tests.