Handle modules/namespaces with global prefix

Fix #658.
Only trim global namespace if it is an exact prefix
Merge pull request #659 from dungpa/global-namespace

Handle modules/namespaces with global prefix
Handle record fields while checking unused open declarations

Fix #661.