Fixes #4402 adds warning to private methods on ElggMenuItem

This also adds unit tests for the majority of the class. Still need to add tests for the tree building methods.