Add an explicit open mode parameter to stream

Allows users to directly specify how stream handles input data (i.e. reads from
a video source, or just distributes the templates)
Add 2 transforms, 1 projects remaining time in a job, the other outputs to a gallery
Preliminary version of an alternate enroll implementation based on stream

Instead of processing things in blocks, this version wraps the transform in
a stream, with the input transform as 1 stage, and the other stage having
transforms that estimate time to completion, nad output templates to a gallery
Hacks to make stream work even when sending empty matrices
Added a convenience toTime function
Merge branch 'master' of https://github.com/biometrics/openbr into streamlining

Conflicts:
	openbr/core/core.cpp
Merge branch 'master' of https://github.com/biometrics/openbr into streamlining

Conflicts:
	openbr/core/core.cpp
Merge branch 'master' of https://github.com/biometrics/openbr into streamlining
Remove some debug output, add a stream to AlgorithmCore::train

Since we no longer add distribute in AlgorithmCore::init, instead adding a
task specific stream in AlgorithmCore::enroll, we also add a stream to the
algorithm in train, so that the training data will be projected in parallel
by PipeTransform::train.
In enroll, apply Stream's staging logic to the base algorithm

When setting up the stream in enroll, use the Stream interface's staging logic
on the input algorithm. Making this happen is slightly complex when we don't
particularly have header files, but on the plus side algorithms incorporating
something like Show (e.g. ShowFaceDetection) will not be used as a single
threaded stage in the process.
Merge branch 'master' of https://github.com/biometrics/openbr into streamlining
Add support for a simple append flag for enroll

This change consolidates the previous 'read' and 'noDuplicates' flags into a
single 'append' flag. If append is specified, and an output gallery already
exists, and the gallery format supports read/write or has explicit append
support, then enrollment will be restricted to those files in the input list
not already present in the gallery, and the results will be appended to the
existing gallery.

append defaults to 'false', which is a deparature from previous behavior.

The .gal format has explicit append support, for other cases, if the gallery
supports both read and write (less common than you might think), we support
append by reading the existing gallery, and writing back out to an overwriting
file. It should be possible to add explicit append support to several other
gallery types.
Some long overdue cleanup/reorganization in stream.cpp

Merge Datasource/DataSourceManager, leaving DataSource as the primary interface
for opening a template list. Introduce an alternate hieararchy for things that
are done to individual templates.

Rename FirstStage->ReadStage. Drop LastStage as a unique class, it can be
represented as a single threaded stage with a transform that just collects the
templates it receives.

Introduce a separate class contaiing the stream mode enum. This avoids a lot of
circular dependencies, giving us a more sane file layout.
Make progress counter give one last output in its finalize method
Merge branch 'streamlining' of https://github.com/biometrics/openbr into streamlining

Conflicts:
	openbr/core/core.cpp
Fixed some things
Make ProgressCounter behave slightly better

Move progress counter after gallery output, this should hopefully give slightly
more accurate initial ETAs.

When doing the finalize step in stream projectUpdate, don't push empty sets
through the rest of the transforms (this reduces spurious calls to project,
making progress counter work slightly better).
Try to be efficient when checking for duplicate names in append mode
Merge pull request #117 from biometrics/streamlining

Leverage stream to do enrollment more efficiently