Performance, style improvements

A shipload of improvements, including several performance changes.

Several style changes included (mostly around trailing spaces) -- sorry for the noise. 

This is a step towards getting in sync with the core project and towards sending our changes upstream.

Probably can/should remove the remotegeojson datasource from this.