gtk3: rename pygtkcompat.py --> gtk2compat.py

Upstream now distributes a module named "pygtkcompat.py", which is
supposed to be imported directly, instead of gi.pygtkcompat. Rename
our internal wrapper around it to avoid confusion.

Only mechanical search&replace changes in this commit.
gtk3: new way of importing pygtkcompat
gtk3: curve.py fully migrated

Curve widgets were looking completely black for me. Turns out it
was the GTK3 theme. Added a print for that. Also, don't draw the
background, because GTK already does that. (Which also prevents a
fully black widget if the theme is broken.)
gtk2compat: abs imports

If there's an old pygtk2compat.pyc in the user's repository, it'll have
priority. Use absolute imports to resolve "pygtkcompat" to the right thing.
gtk3: some easy targets
gtk3: fix tdw rendering translation error

partial fix for https://gna.org/bugs/?20904

GTK3 uses cairo internally now, so we may start out with a translation
when rendering. The previous code did create cairo context directly,
always starting with the identity matrix.
gtk3: fix tdw display update glitch

Don't use cr.user_to_device() any more because we didn't create the
cairo context, so we can't know what "device" means. To transform
points, we need to maintain our own transformation matrix now, because
the cairo context includes the offset from the menu to our canvas.

2nd half of bugfix for https://gna.org/bugs/?20904

Also, drop some GTK2 codepaths. This stuff should be checked for
performance regressions some day.
brushlib: Provide MYPAINT_MAX_THREADS define and request->thread_id

Allows tiledsurface backends to for instance store arrays which
they can index by thread id, for lock-free access.
brushlib: Allow to store any type of pointer in TileMap
brushlib: Move TileMap to separate tilemap.{c,h} file
brushlib: Add missing tilemap.c include in libmypaint.c
lib: Get rid of unused API/code in surface/tiledsurface.hpp
lib: Make the C++ part of TiledSurface a member, not base class

Will make it easier to swap out the underlying C++ class (for GEGL)<
Build: Make OpenMP usage opt-out

Can be disabled using "scons ... enable_openmp=false"
Note that on some systems, like my Core2Duo with HyperThreading on Arch Linux,
one gets better performance when explicitly setting the number of threads to
the number of physical cores. For instance: export OMP_NUM_THREADS=2
gui: Cache the Cairo.Matrix in tileddrawwidget.py

paint_rotated: 1.229385 (23%)
paint: 1.266667 (27%)
layerpaint_nozoom: 1.247312 (25%)
brushlib: Add missing extern C declarations for tilemap.h
lib: Check if PyObjects are actually PyArrays when HEAVY_DEBUG defined
tests/test_performance.py: handle python=Py3, use gprof2dot/eog if gprof2dot.py/feh not found

Having to edit this file on my system was making me go mad.
README: add libjson0-dev to lists of deps to apt-get
lib/tiledsurface.py: Return early if mipmap tree is already marked dirty

paint_rotated: 1.062810 (6%)
brushengine_paint_hires: 1.100426 (10%)
paint: 1.005425 (1%)
layerpaint_nozoom: 1.045390 (5%)
paint_zoomed_out_5x: 1.085650 (9%)
layerpaint_zoomed_out_5x: 1.043557 (4%)