Reorganise header inclusion to minimise dependencies on <iostream> and <boost/lexical_cast.hpp>. Refs #8327.