Bumping gorm version.

Needed support for embedding structs which seems to have been added
recently. Did not test whether this actually works/compiles with
unmodified crawlol code.
Lots of changes, should be almost working.

Split code out into separate files (db and util). Added unit tests for
some of the functions in db and most of the functions in api. Changed
storage of match details so that we serialize most fields except for the
ones we will use to filter the results to the relevant match types.
Couldn't test due to 503 errors for the match APIs.