Update gem management framework

* Switch license to MIT
* Use yardoc instead of rdoc
* Generate a README as needed from a template
* Merge most files containing project details into the README template
* Use markdown for plain documentation files such as README and NEWS
Switch from mspec to minitest for testing
Put class documentation into the correct place
Avoid gem dependencies that cannot be met on older Rubies
Raise RuntimeError rather than hide #set_encoding
Correctly store string lengths in the archive