Fix constness issues

  - make name getter const,
  - define typedef for shared pointer to const device,
  - make operator<< take a const device.
Add a virtual method print in Device to allow virtualization of operator<<.
Make Device::updateDistances protected.