ENH: Move OpenFileForReading/Writing from StreamingImageIO to parent class

The methods OpenFileForReading and OpenFileForWriting are useful for
nearly all ImageIO classes, not just StreamingImageIO.

Change-Id: I3bbe9155f2e052b4d5191758b2b09a242437077f
ENH: Improve OpenFileForReading/Writing logic and documentation

All changes are backwards-compatible.

Updated parameters:
* Renamed the first parameter to be more clear.
* Changed the second parameter to a std::string to provide utility and
prevent unnecessary type conversions.
* Made OpenFileForWriting's truncate parameter optional, with a default
value of true.
* Added an optional parameter for ASCII mode.

Improved documentation for both methods.

Made minor improvements to both implementations, and fixed a bug where
non-existent files could fail to open in read+write mode.

Change-Id: Id036ce9c504a14c857be77e7bad487e9a5c45d52
BUG: Emit StartEvent before a ProgressEvent

It is unexpected behavior to emit a progress event before the start
event has been emitted. It may case problems with watcher which have
this assumption.

Change-Id: I02aaf8309b839a354328f9a0eef2a094ac5bf82b
BUG: Fix Coverity issue 1081600: Use after free

Change-Id: I41f977018ba7e131c7ac9f4d7b59c058c11cde46
BUG: Missing Modified() call

While reviewing differences between the bounded and unbounded
itkLBFGSOptimizer.cxx
itkLBFGSBOptimizer.cxx

The missing call to "Modified()" was identified.

Change-Id: I0bd0526a047fab3f8cb79d4a5b35c81385bd3b0f
Merge topic 'FixStreamingFilterProgressBeforeStartEvent'

3f1ed3ae BUG: Emit StartEvent before a ProgressEvent
Merge topic 'AddExplicitModifiedCall'

9ba4fd98 BUG: Missing Modified() call
ENH: Update ImageIO classes to use OpenFileForReading/Writing

Using the common utility methods ImageIOBase::OpenFileForReading and
::OpenFileForWriting provides more robust error checking and reduces
code duplication.

Any old calls to iostream::open that didn't explicitly use the
std::ios::binary flag were converted to use the new functions in
ASCII mode, just to be safe.

Updated protected method GDCMImageIO::InternalReadImageInformation to
no longer take a parameter, as it was unnecessary.

Change-Id: Iea9ce5729cd6e365d2ae702264dbbc70ff666ec8
Merge topic 'OpenFileForReading-Writing'

2f3a7696 ENH: Update ImageIO classes to use OpenFileForReading/Writing
a73bf6d0 ENH: Improve OpenFileForReading/Writing logic and documentation
6215ca31 ENH: Move OpenFileForReading/Writing from StreamingImageIO to parent class
Merge topic 'coverity_cid_1081600'

cc37deab BUG: Fix Coverity issue 1081600: Use after free