Enable warnings for missing function prototypes
Make functions which do not need to be exported static

And remove one which turned out to be unused entirely.
Merge pull request #791 from realm/tg-static

Make functions which do not need to be exported static