1. Use the keys of angular.OrderedHash instead of vals to preserve the order of items in updating the trial settings such as Measurements, Germplasm, etc.
2. Code cleanup - remove trailing whitespaces

GCP-10168

Reviewer: Daniel Villafuerte