Move most admin menu bar processing to PHP

Eliminates those pesky synchronous getModule() calls.

Should improve admin load time considerably.

also:
• Make getModuleConfig asynchronous
• use _this

Merged back from master to the release 1.1 branch

The original commits are 911477b9b05b5663399ce2c3970bfdc991592200, 851c16d84f133eced204712cb534742c3ab8b04b and 10e72854902aae0b3294a793904747f06a3faf9d