Prepare server code to provide paginated results.
Initial attempt at implementing pagination.

Currently doesn't work well with the WGL4 checkbox.
Improve addition code cleanliness, if not workingness.
Fix pagination issues.

Pagination now works properly in all situations. Page size is set to 128, so
several blocks either fit within this, or contain exact multiples of that
number.