Fixed issue where getRegisteredAQLFunctions() was not using the namespace filter if provided.

Added a test to check for this as well.