Make CHECK macro take a format.

This has been bugging me for a while, so I figured I'd just fix it.
Add Serialize and Deserialize MFNetwork methods.

These methods serialize the network to a buffer in memory. A
new, significantly more robust file saving and loading system
makes use of them. What they are really needed for, though, is
saving the entire population of a genetic algorithm to one file.