Added menu item auto register

Refined menu module code, fixed the timing issue;
Refined related tpl. (also for adding layout title meta)