Polymorphic mapobjects

I extracted the object creation tools into separate classes, in preparation of the bezier tool. 
I hope I didn't make too bold changes.
Please put a space between `if` and `(`.