ngui gargantuan PR

mostly renaming, adding comments, moving things around as per conversations with @nistala and @ajainarayanan ( cf #544 )

also includes Tenant form feature.

 
`promise.catch(errorCallback)` – shorthand for `promise.then(null, errorCallback)`