Trim training set size in LearningTaskControllerImpl.

This CL enforces a max training set size in
LearningTaskControllerImpl.  After reaching that size, it replaces
existing examples at random.

It also changes how often new models are trained as examples are
added.  By training when there is some minimum fraction of new
examples in the training set, it trains more often when there is
little training data.  This helps get the model trained sooner,
and start making prediction sooner.

Since the training set is smaller, these additional models shouldn't
be too expensive to create, either.

The LearningTask has both of these constants.

Change-Id: Iaeb851fe925597e37d114102758ddc5651ebb2dc
Reviewed-on: https://chromium-review.googlesource.com/c/1414230
Commit-Queue: Frank Liberato <liberato@chromium.org>
Reviewed-by: Dan Sanders <sandersd@chromium.org>
Cr-Commit-Position: refs/heads/master@{#623888}
5 files changed