Fix for OpenMP C++ standalone: if the number of synapses was not divisible by the number of threads, not all synapses where always included in the last thread

(cherry picked from commit 66a462cc4bde6e9dda020fbdc294527c5706df06)
New option optimisation_flags pref for cpp_standalone and moved
openmp_threads pref to devices

(cherry picked from commit a1ebd29db509b23531c2a7c7439b00e9e74ea78e)
Store the variable_indices in `CodeObject` instead of discarding them after code generation
Merge remote-tracking branch 'origin/master' into device_correctness