API improvements

API calls implemented:
system.uninstall,
device.thumbnail,
device.index (for getting and setting device aliases and order)
some bug fixes