Added new REST resource: distributions

 * There is still a lot of Factory-specific code in the distribution resource
 * Staging projects are now a nested resource of distributions
 * The previous /dashboard route becomes the distribution's show
 * A lot of refactoring moving logic into the models
 * Jobs with result 'none' show their state in the distribution view