MCPServer: replace databaseInterface with Django models

`databaseInterface` is still imported in a few places in MCPServer, primarily for the `getUTCTime` function that will be moved elsewhere, and for database locking that may be removeable.
Moved outside the loop.