manage assignment of devices to user

This logic assumes a user can have at most one physical
phone and one softphone device associated with him/her.
This patch allows us to assign any combination of the two
devices to a single user.. When we unassign devices we
leave current configuration in case the device is controlled
by another user simultaneously.