Fix memory leak in curve and faces thru changes to primitives.py; very minor cleanups elsewhere