fixed an off-by-one error introduced in the latest commit which broke the main
device detection routine and fell back unto the alternative device detection.



git-svn-id: svn://svn.code.sf.net/p/spacenav/code/trunk@155 ef983eb1-d774-4af8-acfd-baaf7b16a646
Fixed a bug introduced with the multi-device support patch. device->close()
would not be called when removing devices any more muldi-device patch was
applied). This would leave LEDs on when shutting down spacenavd.

Also simplified the code in some places



git-svn-id: svn://svn.code.sf.net/p/spacenav/code/trunk@156 ef983eb1-d774-4af8-acfd-baaf7b16a646