Less static stuff in noexternallanglinks

- moved hooks to hooks file
- add test case

Change-Id: I7bd87a08aada3a85f9602ea021fd33d724aaa1d8
Merge "Less static stuff in noexternallanglinks"