strictly use |delete| operator

* delete a property that won't be used anymore
* set null to a reusing property to clear it, to avoid new rebuilding
clean all at once
use () to param of arrow function without arguments
optimize building function of app list

* remove a redundant flag |isValid|
* fix trying to sort a empty array
attach 'command' event on the root menupopup instead of each menuitem

* set a new property to a menuitem. it is an index number in an app list.
* and then, retrieve it and do action by an item with the index on command of
  the menuitem.
minor fix

* use |let|
* use the arrow function, for a callback function for now
* create a constant |kMaxLen| for a magic number
* edit comment
* alignment and formatting