Simplify argument passing in the  serialization functions and inline them.
Rename serial_funcs.i -> serial.i, matching other include files.
Move the "page write generation wrap" check outside of the serialization
mutex -- this is safe because the test is for (4B - 1M) generations, and
there's no possibility of a million updates stalled between the wrap check
and the update.