Fix helpers/devices.py
This supersedes !1701 (closed) (keeps first commit and removes the pmb.api stuff)
This fixes list_apkbuilds which is dead code currently but is useful for external software using pmbootstrap. It also adds list_deviceinfos which does the same thing but for the deviceinfo data.