Resolves at least one BIG memory bug.  hoorah

I finally figured out that the problem was that constructModelmex was being cleared, therefore destroying the memory allocated with it, before the delete function was being called (at least on some platforms). added mexLock and mexUnlock logic to protect against this.

i've updated drakeMexPointer, and IKoptions, but not RigidBodyConstraints (which reimplemented their own mex pointer classes!!)