Refactor duplicated code between d3gl types

Factored out shared code between d3.gl.globe and d3.gl.model into a higher-level closure d3.gl. Refactored initializing and rendering code for both globe and model to make things cleaner and easier to read.