ui: refactor and use a unified unboxing helping method in cloudStack.js

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>