[engine] Fix various unit tests and a bug with debugging being enabled on any task with ID 0.
[misc] Fix endianness in utils unit tests.