reduced overhead

added move to avoid copies, a device id can be chosen when a program
is created (all available devices are numbered from 0), added
device_info to store information about available devices