WIP : General cleanup using SonarQube and proofreading the code

Note: this is a work in progress so you can see where it goes. No behavior changes, no API changes, just general cleanup.

Feel free to comment on the various fixes.

Each commit should be self sufficient and self explanatory (at least, I hope so).

Note: I grouped them because I'd like to work without waiting each PR to be accepted. And as I will touch a lot of files to clean them up, I'm a bit afraid of merging conflicts.

-- 
Guillaume