Unify AnimeRecordStub and MangaRecordStub in RecordStub

They were only separated for deserialization by retrofit, but that can
be handled in one class. Basically the getId() function just has to
return the correct variable.
Also added a check to the relation saving functions to prevent saving
a record with 0 as id.