Iterator: Use boost::result_of to determine nested result type of function in transform_iterator. Fixes #1427.