Convert Units, sections, and chapters to database entities

port all existing services to use the new data model
fix section ordering problem
implement migrations that preserve data
various minor bug fixes