Refactored settings and test cases

Settings are stored in their own object now and not in "app" anymore.
Refactored all tests to go straight to the module functions instead of finding the calls in the server
Added query for just local packages
Updating package meta attachment URLs on host/port changes.
Fixed settings-test
Fixed registrypath env variable
The _local flag is not necessarily set on an old package meta, so just checking _proxied