PARQUET-82: Check page size is valid when writing.

No, this removes the code duplication by calling the more general writePage method.