8042377: BufferedWriter and FilteredOutputStream.close throw IAE if flush and close throw equal exceptions
Summary: Explcitly handle IOExceptions in FilteredOutputStream.close() instead of using try-with-resources approach.
Reviewed-by: chegar, alanb
Contributed-by: Peter Levart <peter.levart@gmail.com>