Improved type detection

Device type detection is not working well in network mainly together with device renaming.

This PR starts refactoring of "device type" API and also fixes bnc#809053. 

Also, this PR partially breaks backward compatibility as it renames GetDeviceType function to GetDeviceTypeName as it provides device type description in human readable form not type identifier.