Use toThrowdeveloperError instead of toThrow
Merge pull request #1570 from AnalyticalGraphicsInc/primitive-prologue

Miscellaneous changes ahead of geometry refactor.
Merge branch 'master' into issue1487