Resolve cross-dependency issues between oae.js and server.js

The cross-dependency was introduced in #468. We should try to restructure things so that we no longer have a cross-dependency.