adding angle average util function
use angleAverage in pelvis motion control block
logic improvelent (handles case when some link_constraints have dtraj, but others don't)
adding cpp angleAverage function
pelvis cpp controller uses angleAverage
fixed variable not defined bug
adding use_mex=2 to body/pelvis motion controllers
adding a walking test mex unit test
Merge pull request #265 from mposa/master

Added integration method support to contact traj opt, updated brick test case.
moved angleAverage to drakeUtil
Merge pull request #266 from kuindersma/add-angle-average

Add angleAverage
mex for desired individual support surface cops
Extracted out function that computes individual CoPs.
* created and thoroughly tested resolveCenterOfPressure function, which computes the cop and normal torque given wrench exerted and contact plane
* created and tested individualCentersOfPressure, which computes desired COPs at each foot given QP controller solution
* started to update the C code based on these changes.
Mex for individualCentersOfPressure. WIP.
finished C++ implementation of individualCentersOfPressure. Test passes.
Merge pull request #264 from tkoolen/individual-cops-mex

Mex for desired individual support surface COPs
resolves megaclear crashes.  horrah.  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.
apply fix to IKoptions mex
changed variable name as suggested by Hongkai