Moved the command-line number parsing routines into the library.

This will be needed to support an upcoming change.
Added set_option() API and "-opt" option

The idea is to easily support a large number of format-specific options
Replaced -bmpversion option with -opt bmp:version
Reimplemented -jpegquality and -jpegarith using -opt
Reimplemented -zipcmprlevel and -webpquality using -opt
Reimplemented -jpegsampling using -opt