rest_handler, cosmetic: clean up order of variable assignments
We assign a couple of varibales before we output them to InfoList,
let's make sure the order is consistent with the order in InfoList.
Related: SYS#8100
Change-Id: I2b998a619cf1db5532bcfe671d6d451d095c37f8