Fix for #163 : Improved import detection for REST interface generators

Follow-up for https://github.com/rejectedsoftware/vibe.d/issues/163
I have no idea how to forge external modules for unit-testing generateModuleImports so tested only on my code. Please review carefully.

I wonder if some more generic type/symbol processing primitives can be designed (and included in phobos) instead of stockpiling similar utility functions.