This change moves visibility attributes from out-of-class method definitions to in-class declaration.
This is needed for a switch to attribute((internal_linkage)) (see http://reviews.llvm.org/D13925) which can only appear on the first declaration.
This change does not touch istream/ostream/streambuf, which are handled separately in http://reviews.llvm.org/D14409.