It can be useful for Github to show the license next to the repo, and
it's clearer that the license applies both to the Rust code and the
viewer this way.
The project was relicensed from BSD-2-Clause to MIT in 2023, but the
first year of the copyright is when the project started in 2015.
Newtypes are cumbersome in C++, so this is mostly documentation for now.
Also replace lots of questionable uses of size_t with int or types with
explicit width and add a few comments for constants.