Fix up functions that were returning tools::max_value to call overflow_error instead.
See https://svn.boost.org/trac/boost/ticket/10111.