Fix type punning bugs in ext2fs_get_mem() and ext2fs_free_mem()

This was causing dumpe2fs to crash on the ARM platform when examining
the badblocks list.

Also reverts an incorrect fix made by changeset 38078f692c20

Addresses Debian Bug: #397044
3 files changed