fixed small bug; sometimes device metadata would never be created.

 Now, we force it to be created right after devices are downloaded and created, and before syncing models.

Code has comments re: problem and solution.

I couldn't target this for hotfix, as there is no testbed in that branch to easily try out the solution.