Replace #pragma-pack BMP header reads with little-endian byte
readers so the tool works on any host endianness. Add dimension
and color-count range checks, zero-init pixel remap table, check
calloc, free bmpdata on early returns, send malloc errors to
stderr. Add bp>xbuf guards to xpmgetline's strip loop.