Big package re-org

Moving lots that doesn’t belong in the server.api package to an
appropriate location.