dvox: Displaz batch point cloud voxelizer

Create a command line utility for producing LoD structures by voxelizing
point clouds into new "hcloud" ("hierarchical point cloud") format.

* Dump octree index and data to new hcloud file format in a rather
  inefficient and uncompressed form.  Major improvements will be
  required to make this efficient!  No real loader yet, so validity
  fairly untested.

* Copy las file loading and octree creation from PointArray, and
  simplify for batch usage.  Additional refactoring required to reduce
  code duplication.
Create HCloudHeader and move header IO into there
First pieces of hierarchical point cloud viewer

* HCloudView class for displaying .hcloud files.  For now this simply
  reads the cloud index and displays the bounding boxes rather than
  doing anything much useful.

* Start putting together a more generic geometry drawing interface

* Make TransformState use double precision so that large offsets to data
  origin can be represented simply.
Dump cubic octree bound to hcloud rather than tight bound

The tight bound might also be useful later, but the octree bound is
essential when reconstructing the tree.
hcloud voxel rendering and incremental read

* Implement hcloud rendering of stored voxels points (no leaf points
  for now).  Include a new shader for LoD voxels.

* Incrementally read hcloud file from disk as required by seeking to the
  relevant chunk and reading it in.  The current naive scheme causes
  rather a lot of interface stuttering - needs optimization.

* Expand hcloud header with a few extra fields as required

* Fix broken node data offsets generated by dvox

* Enhance TransformState to contain viewport info as required
Limit number of bricks loaded in a frame

When drawing, traverse tree in breadth first order; draw nodes when
they're small enough or when we've loaded a given quota to avoid the
frame rate plunging.  Pretty rough, but illuminating that this sort of
works.
WIP: Page cache over a std::istream

The idea here is to reduce the amount of seeking and rereading of data
by putting a page cache over an input stream.  Initial naive testing
indicates that it might not help much for local files, but there's lots
more to do.

* Rudimentary page cache class for std::istream, without proper cache
  rejection so far (memory usage keeps growing until the whole file is
  cached!)

* Hook up to HCloudView in a pretty crap way for an initial test.
Improved page prefetching

* Implement proper priority-based page fetching so that more important
  data (coarser level of detail; closer to camera) comes in first.

* Fetch pages based on tree traversal from previous frames (will result
  in an empty first frame), respecting priority.

* Change prefetch priority ordering so that higher numbers result in
  higher fetch priorities.  This seems more intuitive than the default
  sort ordering based on <.
Add dvox command line arguments

* Add -minnoderadius to specify minimum size of octree node

* Connect up -pointradius to specify size of points during voxelization
Fix missing include
Logger support for early exit and debug logging

* Debug logging level

* Early exit before formatting log messages, so that debug messages
  don't cost much

* Setting to make progress logging optional
Exception type with convenient message formatting
endswith() string utility function
PointDbWriter class to tile las files into pieces

PointDbWriter allows large point cloud files to be split apart into
tiles without using much memory or too many file handles.
Support variable tile size in PointDbWriter

Also move tile coordinate handling utility into util.h
Simple point DB work in progress

Create a simple point database query object which can return points
based on bounding box.  Currently limited to returning position relative
to some offset, and intensity.
Make simple .pointdb format use 3D tiles

Binning into 3D bins makes queries far faster in areas which are
vertically separated from the actual data.
Merge branch 'master' into lod
Bottom up octree build, WIP

* Build octree in bottom up fashion by traversing point database
  in Morton order.

* Shader for help in debugging octree hierarchy

Broken:

* dvox hcloud writing broken due to being used as a test entry point

* Various code cleanup and commenting required
Ordered dithering for partial coverage

Using dithering for partial coverage is more visually pleasing than
simply scaling down the size of the point, so do that in the fragment
shader.  The implementation is quick and dirty, so probably quite
inefficient...