Fix #3412: Cryptic error message when addMenuItem() is passed bad args

Fix for the issue #3412 by graving the resulting error code from the callback and providing a better error message for each code. I added a similar approach to `addMenu()` since it had a similar problem.

I searched through the Brackets Shell code to find which where the possible error codes for each function to provide a specific error message for each, but let me know if I missed one, since I mainly went through the Mac implementation since in the Win one was harder to find the error codes, and the list isn't complete in the JavaScript file.