ngui gargantuan PR

mostly renaming, adding comments, moving things around as per conversations with @nistala and @ajainarayanan ( cf #544 )

also includes Tenant form feature.

 
`then()` returns a promise, which has a `then()`, which returns a promise, etc...

if you don't like "catch", we can do `then(function() {...}, failure) `, but when you do that it only works for that point in the promise chain.