Split memory management

Some attempts to address #1079 -- just for discussion at this point.
@michaelcahill, not sure about the `(size_t)` cast, I don't see why it would be necessary.