Added WMME input class. Refactored the code.

* Added a base class for WMME I/O.
* Some details temporary made public (for testing).
* Removed the unsafe qualifier from FrameBuffer class -- not required.
* Changed args order for output class for consistency.
* Added a static method to WMMEException to reduce copy-paste check
code.