Started implementing support for resources. They are now synced with the service and can be stored in the database, though they are not yet displayed in the NoteView. Also, small restructuring to bring control of note content into the hands of the NoteView.