Added caching to WPMenuEditor::current_user_can(). This improves menu generation time by about 16%. 

Since current_user_can() is hookable and thus inherently dynamic, the cache is only used in a few very specific places where we can be reasonably sure that the capability assignments will not change while caching is enabled.

git-svn-id: https://plugins.svn.wordpress.org/admin-menu-editor/trunk@795259 b8457f37-d9ea-0310-8a92-e5e31aec5664
Refactored ameMenuItem::is_hook_or_plugin_page() to exit early if it's obvious that the input is/isn't a hook or plugin page. The new code is a tiny bit less readable (more lines and returns), but this change improves menu generation time by 8% - 10%.

git-svn-id: https://plugins.svn.wordpress.org/admin-menu-editor/trunk@795270 b8457f37-d9ea-0310-8a92-e5e31aec5664