Add OpenMP support to standalone mode, including the spike queue
Default to OpenMP with 1 thread, using 0 threads does not work in SynapticPathway etc.
Thanks to Marcel, turned synapses.h and network.cpp into templates, such that we can use a function (openmp_pragma) that will handle
the insert of pragma statements in the code. Now the number of threads can be given as a brian preference. By default, if 0, nothing is done and
the code is not relying on openmp at all. Otherwise, if a positive number is given, then that number of threads is used
Forgot one file. Now I'll try to merge that openmp branch with latest master before launching a pull request
Remove files that are not needed anymore because they have been turned into templates now
Merge branch 'openmp' with 'master'. Fix few things related to the report system, needs some tests to check that openmp support is
fine, and I'll push it

Conflicts:
	brian2/devices/cpp_standalone/brianlib/network.cpp
	brian2/devices/cpp_standalone/brianlib/network.h
	brian2/devices/cpp_standalone/device.py
	brian2/devices/cpp_standalone/templates/main.cpp
	brian2/devices/cpp_standalone/templates/ratemonitor.cpp
Fixa bug in the summed variable synapses, that occured during the merging, and change the default value of the
openmp preference to 0. Everything seems to run smoothly, speedup depends on the simulation, so more intensive
benchmarks should be performed
Forgot a pragma insert for the summed_variable templates, and also add some more pragma statement in the main.cpp files, when
objects are created from the device.py file. Now I'll start to do some benchmarks to check when optimizations are useful
Some polishing, bug fixes, and optimizations in the openmp implementation. Benchmarks are on their way, but
the results seems to vary a lot depending on computer architectures, networks, ... Quite some overhead due to
openmp threads creation could maybe be reduce by merging threshold and stateupdate loops, need to check
Now the threshold.cpp file is also handle in parallel, with OpenMP, and thanks to the ordered flag.
This seems to lead to large speed improvement, because the threshold operation is one of the
major bottleneck in according to some profiling.
Remove some unnecessary synchronization barrier in some single calls. Not sure this has any
effect on speed performances, but at least, it allows to better understand what are the calls
exectuted by single thread that need to be synchronized and those that do not require it. Note
that updates are always synchronized because of the barrier in the network.cpp file
Add the const keywork in front of local constant that have been added in the code. Also add the static-ordered
trick in the peek() function of the SynapticPathway, to share the load safely among threads. Even if not parallel,
this seems to be still a bit faster than one thread running everything. Did some profiling: performances are always
increased with OpenMP, as long as the defaultclock is not too small. Sadly, for code using small dt (<0.1ms), the overhead due
to loops and to synchronization slows everything compared to without OpenMP
Modifications for the benchmarks. Now the correct simulation time is recorded and displayed, thanks to code insertion in the c++
templates. To do so, I added one #include in the main.cpp templates. Note that those benchmarks are showing that for some
deterministic example, operations are not always performed in the same order on a run-to-run basis, so results can be bistable
Enhance the plots of the OpenMP benchmarks
Make sure that the order of objects in a `Network` is deterministic, even for arbitrary orderings (same dt, when and order attributes).
Add some documentation for the OpenMP mode, either from a user or from a developer point of view. Note that the part on the
OPENMP_AWARE flag is not written, because this has still to be done. Marcel said that Dan may have the time to implement that
Addition of a test checking the consistency of the results with multi-threading. A quite decently complex
network is covering almost all the templates, and simulations results are carefully compared without OpenMP,
with OpenMP and 1 or 2 threads.
Merge remote-tracking branch 'origin/cython_codegen2' into openmp

Conflicts:
	brian2/devices/cpp_standalone/device.py
	brian2/devices/cpp_standalone/templates/spikemonitor.cpp
	brian2/tests/test_cpp_standalone.py
Use `assert_allclose` in the OpenMP consistency check to allow for small numerical differences
Store the name and source code of templates in the `CodeObject`