Restart mongodb on template change
Cleanup code creating the db connection string

It's important to sort the servers in case of replica set (to avoid the
string changing on every chef run), and it's also important to get the
IP address through the barclamp library (to really have the admin IP
address).
Remove unneeded variable
Rework setting the replica set attributes on nodes when applying

There were several issues in the old code:
 - using sets of different types (NodeObject and string)
 - unneeded save when there's no change
 - additional save for controller
ceilometer-server role needs at least 3 nodes in a cluster