Modify dotProduct and crossProduct to only accept specific vectors.

dotProduct's behaviour is different for different dimensional vectors.  Here
a utility template is used to ensure that only vector types and specific
dimensions are operated on.  In the case of crossProduct, vec3 is the only
viable candidate and so no other types will work. <- check with unittesting!