merged fixes from previous instance of branch (r38875:40542), addressing #856 and #586

svn path=/sandbox-branches/birbacher/fix_iostreams/libs/iostreams/; revision=40550
removed whitespace at the end of lines

svn path=/sandbox-branches/birbacher/fix_iostreams/libs/iostreams/; revision=40552
formatted code: removed whitespace at end of lines and added some empty lines to increase readability

svn path=/sandbox-branches/birbacher/fix_iostreams/boost/iostreams/; revision=40689
formatted code: added some empty lines to increase readability

svn path=/sandbox-branches/birbacher/fix_iostreams/boost/iostreams/; revision=40690
removed compiler warning about missing newline at end of file

svn path=/sandbox-branches/birbacher/fix_iostreams/libs/iostreams/; revision=40691
fixed signedness of variable and cleaned up whitespace

svn path=/sandbox-branches/birbacher/fix_iostreams/libs/iostreams/; revision=40696
Test case and possible fix for Issue #1002

svn path=/sandbox-branches/birbacher/fix_iostreams/boost/iostreams/; revision=40700