util/binaryreader: added support for specifying length tag as uint8/16/32/64.

Commonly the length is specified just before the data to be read so
there's no need to store the length as a struct field for those cases.