parse: bootimg: make it work again
Commit 826bb4f2 (pmb: Properly type Bootimg (MR 2464)) broke the bootimg_analyze command since some assumptions in whether the bootimg dictionary had empty keys or non-existent keys were changed without their usage being updated.
Fix this and introduce unit tests for both boot image analyze and it's counterpart which generates deviceinfo options.
I'll note that these tests predominantly test that the behaviour doesn't change from its current implementation. It doesn't test that the current implementation is correct.