MODULES-154 Support layers and add-ons

David, this is what we've talked about. Comments? I'll be back from dinner in an hour or so.

I plan to spend an hour or so this evening porting this to the 1.1 branch in case we don't want to pick up the other changes on master for AS 7.2. Should be simple.