Preliminary work on not loading complete galleries during enrollment

Some work on incrementally loading galleries rather then loading then in full prior to enrollment. Large galleries with metadata are quite costly in terms of memory, so it is desirable to avoid loading them if possible.

The most obvious problem that occurs when switching to incremental reads is that progress counting becomes difficult, we don't typically know how many files are specified in a gallery without reading the entire thing. One solution is to do progress counting based on progress through the gallery file (position of file pointer / size of file = % complete), which is implemented here. This required a change to the Gallery interface, galleries should now expose their total size via a method call, and also set a progress count on read templates in their "p" property.