Moved lots of copy-paste code to a new superclass.

Copy-paste code from Tile and MapObject to superclass TerrainElement.

Also made some subclasses final.
Reorganizing.
Created new class Ice, a subclass of Ground.