[Format] Update clang-format to version 18
Clang-format has been updated to use version 18.1.8.
Some deprecated options have been updated to the corresponding new ones. Some missing rules were added to fix inconsistencies in the code formatting:
- Add new line ad EOF and trim additional ones
- Trim empty lines at beginning of blocks
- Allow brace-less single line if/else/for/while statements
- Align pointer/reference to the type
All files have been re-formatted as well.
Edited by Niccolò Betto