Implement "segregation" of mesh groups

Model::renderMeshes() was constantly switching shader programs between every mesh of a model. This causes a fairly significant performance hit on models with lots of sub-meshes (like the Westfield model). This change does a preprocessing pass on the meshes of the model geometry and stores a list of mesh types which require each different shader type. renderMeshes() is changed to support doing a single group pass at once only changing the shader program once per group type. This makes the Westfield model jump from 15fps to 55+fps on my low end MBP.

This PR also includes some enhancements to the timing stats.
Actually Qt says that QList is faster than QVector for this sort of thing. 

Also, since I don't know how many items will be in each group I don't know how large to make the vector. 

> On Oct 15, 2014, at 5:36 PM, samcake <notifications@github.com> wrote:
> 
> In interface/src/renderer/Model.h:
> 
> > @@ -332,6 +332,31 @@ class Model : public QObject, public PhysicsEntity {
> >  
> >      QVector<AABox> _calculatedMeshBoxes;
> >      bool _calculatedMeshBoxesValid;
> > +
> > +    void segregateMeshGroups(); // used to calculate our list of translucent vs opaque meshes
> > +
> > +    bool _meshesGroupsKnown;
> > +
> > +    QList<int> _meshesTranslucent;
> I wouldn't use QList but vector instead.
> The only benefit of list is random insertion but we are not going do that much with the meshes of the model
> The vector are more compact and since we will traverse it element by element it's cache coherent.
> I just learned that watching a recent prezo on this by herb sutter :)
> 
> —
> Reply to this email directly or view it on GitHub.