Implement Template#merge

This should fully encapsulate the logic of combining resources without 
silently losing information.

Supports all merging combinations between
* Templates
* Hashes
* attributes defined as rich objects
* attributes defined as hashes.