AP_Terrain: split up code into separate cpp files

this should make it a bit easier to review