Break out and simplify the datamodel and endpoints interfaces into
their own libs.

Change-Id: I7db04edff80e7074ab58ef87e917a176a14aad6d