Added get/setLayout() methods to Template Library

- Deprecated the public $layout property. It should be protected or
private in a future version of the library.