Replace JSONDecodeError with ValueError

simplejson has JSONDecodeError, but json doesn't.
Catch both JSONDecodeError and ValueError and add a unit test to confirm that both are caught and the expected service exception gets raised.
Copy deviceIndex into the device_index property

Prior to this patch the device_index of an attachment was always shown
as zero.

Addresses issue #1631
Actually, we really only do need to catch ValueError. James pointed out that JSONDecodeError inherits from ValueError. Tests continue to pass.
Use assertRaises instead of try/except blocks for unit tests
Modify attachment device index to be an integer as stated in the service docs. Add unit test to make sure deviceIndex is passed to network interface attachments and to make sure it gets properly cast to an integer.
PEP8 fixes for example response
Merge remote-tracking branch 'taylordt/device-index' into develop
Merge remote-tracking branch 'taylordt/json-vs-simplejson' into develop