[FEATURE] fix all gcc warnings and turn warnings into errors

- Fix all current gcc warnings
- turn on `Werror` for gcc
- see also #738
- a few TODOs remain, see that last few commits, I would be happy to get some input