Sandboxing NavigationBarHook get_entries

Added unit tests to test sandboxing

Testing Done:
* Unit testing, added to test suites in reviewboard/extensions/tests.py
* Unit testing with and without the sandboxing

Reviewed at https://reviews.reviewboard.org/r/5708/