Reference count units

In this branch we aim to refactor all of the engine modules that hold pointers to units, to hold reference counted pointers (boost::intrusive_ptr) instead, and refactor the animation module to use this, so that it will not segfault when a unit is destroyed.