some C++11-fications and technical tweaks

:exclamation: Please apply this after PR #28 :exclamation: 

There are two main changes here:

1. using `std::shared_ptr` wherever possible instead of plain C pointers to harden the code and don't have to deal with lower-level memory allocation (no need for `new` or `delete` statements).
2. transforming `Controller::LevelIter` into a real std::iterator

I'm still a little unhappy with a few things. However, the aim of these changes is to move everything closer to stdlibc++ by using `std::algorithms`, `std::iterator` and alike.
Maybe `get_level(-1)` should return the finest level :)

Or we can add `get_finest()`.  This seems like it would be a fairly common operation.