loaders: Finish ByteUtils.

Add code to handle the endianity, needs to be tested.

Signed-off-by: Cyril Hrubis <metan@ucw.cz>
loaders: Change ByteUtils format string.

Making the format string more readable.

Also fix a few bugs.

Signed-off-by: Cyril Hrubis <metan@ucw.cz>
loaders: BMP: Adapt to the ByteUtils.

* Fix existing usage

* Make use in header loader

Signed-off-by: Cyril Hrubis <metan@ucw.cz>
loaders: BMP: Add check for non-zero width and height.

Signed-off-by: Cyril Hrubis <metan@ucw.cz>
core: ContextAlloc: Add check for zero width/height + test.

Signed-off-by: Cyril Hrubis <metan@ucw.cz>