Use priors

Added priors to training procedure.
The best classifier for each character is now chosen based on its
predicted accuracy.
The training procedure now also returns optimal thresholds for each
classifier.