Add concept of stack and app to Riff-Raff

Over the last few months web sys have developed a concept of Stack and App (see http://confluence.guprod.gnm/display/WEB/Using+STACK+and+APP+to+configure+and+manage+infrastructure).

This pull request adds better support to Riff-Raff for this concept - drawing on information that is now available in Prism to lookup hosts and other resources.

This change should be backwards compatible to allow both legacy and stack based deploy.json files to co-exist for a period of time.