Adding unique and unique_toguether constraints for Machine, LogId and MachineConfig models.
Saving machines and machines configs in a more efficient way.