gpt-auto-generator: do not assume that /dev/block/%u:%u is useable

The generator might run before udev, and udev sets up the /dev/block/
symlinks, hence we cannot use them from the gpt generator. Instead,
manually translate a major/minor to a device node.
logind: fix build for ARM with sizeof(dev_t) > sizeof(void*)

Unfortunately on ARM-32 systems dev_t can be 64bit and thus we cannot
store it easily in void* keys for hashtables. Fix that by passing a
pointer to the dev_t variable instead.
Remove six unused variables and add annotation

clang FTW!