Fixed memory management of Geometries within Layers.

- Used smart shared pointers instead of raw pointers, which could have
been double-freed.
Initial header cleanup for Layer.
Rewritten/documented use of viewport size/point in Layer.

- Other documentation/comment fixes as well.
Added explanation of maths/points/etc... to mouseEvent.

- Renamed mapmiddle_px to map_focus_px to give more meaning to what it
represents.
Rewritten draw functionality in Layers.