Disable testing if BUILD_TESTING is switched off

This is an "official" switch for disable testing; our own code which
adds tests should adhere to it. (It is added by CTest)
Add a switch for examples similar to the one for tests

Running tests during development at least has a purpose, but compiling
all the samples *every* time is just an annoyance.
Let the AutoTools script disable tests and samples also
Merge pull request #292 from rolk/292_fastbuild

Add possibility to skip building tests and examples