Changed order of calls to register new nodes

Modified agent to checking if node was before registered, based on existence
of nailgun_uid file. If file exist, only put is call, in other case when we
try made post (if call was succes-201 or node exist 409, we call put method)

Change-Id: I98680be7355e77512addb97f301c713cbf13c23c
Closes-Bug: #1305017
Merge "Changed order of calls to register new nodes"