fix(typeloader) load custom resources from package.json if exists

Code cleaning

Fix multiline variable declaration format

Add check for package.json and its dependencies

Add try catch for package.json parsing

Isolate json parsing in try catch

Test: Add unit test for type-loader
Merge branch 'master' of https://github.com/NicolasRitouet/deployd