Some systemlib cleanup

Summary: Refactor to allow us to build sub-libraries

Reviewed By: @ptarjan

Differential Revision: D1579650