moveblocks example modernization
Remove unused StateSwitchEvent constructor that was leaving
m_rand uninitialized.
Use constexpr instead of anonymous enum to declare a custom
event.
Reformat the code in some places using clang-format.
Use inline class member initialization.
Add 'explicit' to some constructors.
Use 'auto' where appropriate.
Use per-class includes.
Pick-to: 6.5
Task-number: QTBUG-111448
Change-Id: I7cdf243ccae25114c7ffa67dd75f981bfeac759f
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>