device: added register_class_devname() API

this allows drivers to register generic device names for a device
class, with automatic class instance handling
hmc5883: use register_class_devname()
l3gd20: use register_class_devname()
lsm303d: use register_class_devname()
mpu6000: use register_class_devname()
l3gd20: close fds before exit
lsm303d: close fds before exit
mpu6000: close fds before exit