iio_device_attr_write_*: fix return value

make these functions return 0 on success instead of the number of
bytes written in accordance with the API
iio_device_debug_attr_write_*: fix return value

make these functions return 0 on success instead of the number of
bytes written, in accordance with the API
iio_device_reg_write: fix return value

make the functions return 0 on success instead of the number of
bytes written, in accordance with the API
Merge pull request #2 from gizero/fix-return-values-attribute-writes

Fix return values attribute writes