Added date parse function

Takes a bunch of text, looks for dates and returns the most common one
and the number of times it occured.
Intended to be used with document classes to specifiy the date of the
documents.
Cleanup from merge