chrome.contextMenus cleanup and tests

Cleaned up chrome.contextMenus APIs to conform to other extension API style.
Added tests for contextMenus APIs.