Iterator: merge several changes from trunk.
function_input_iterator
boost/iterator.hpp
add_reference
Did not merge changes for #1427.