TWRP: add bootloader offset parameter, some cleanup