Support async addDevice and similar methods.

The wrapper for AsyncCall always considered the first number to be an error if <>0.
Only negative numbers are errors. addDevice for example returns a positive new device id.

Also reorganized some tests in relation to this.