Refactored retained mesh add_face code, and added function for getting the number of vertices required to add another face to the mesh so that constructing a mesh is less prone to throwing an exception