Handle an invalid verbosity value in the next command-line argument as if no argument was given

This should make usage of '-v' more natural, where people usually do '<prog> -v <file>' to see
the verbose output. If the invalid value is given in the same command-line argument, such as
'-v<value>' or '--verbose=<value>' then the right diganostic message is still produced.
Remove unused code

The NewGRF specification clearly states that multiple sprites may use the same ID.
Check the sprites section offset in version 2 GRF files
Turn file_{open,create}() functions into macros

These macros will be defined to the default file open/create methods.
Fix wrong format specifier

Although it wouldn't print a wrong value unless line numbers are high enough,
better use the correct format specifier.
Reduce the scope of some variables