FEATURE: clear sessionStorage, localStorage and cookie on "refreshClearCacheCmd" (fix #595)
remove cookies using Services.cookies.removeCookiesForApp
move appUpdate & clear cache prosthesis helpers into a singleton object "SimulatorAppUpdate" + escape origin for query selector
back to a single simulatorAppUpdate function (coding style improvements)
FIX: get app iframe using a safer method + removed "get app window" helper
check if localId is defined (prevents silent error due to race conditions on DOMApplicationRegistry.webapps changes)
fix coding style
tweak error messages
Merge pull request #602 from rpl/fix/595

FEATURE: clear sessionStorage, localStorage and cookie on "refreshClearCacheCmd"