Add expire and ttl methods to namespace module

This pull request adds two missing methods (that I needed), adds the tests and completes the missing namespace tests that had been commented out.