Use 'auto' for iterator type.

Avoid spelling out the type of the map iterator, which can be deduced by
the compiler. The const int job_id and const std::string& machine_name
are probably better off with their types explicitly given, though.