Motion detection reads default parameters from config with MotionParameters

As with the MatchParameters class introduced in commit 25d7f3a9, which
enabled global configuration of template matching parameters instead of
per match-call, this commit adds the same functionality for motion detect.

In the process, it exposes the `erode_passes` parameter for the motion
detect algorithm. Users should note that, whereas with templatematching
where increasing the number of erode passes increases makes it more likely to
get a false positive, increasing the number of erode passes in motion detect
is more likely to yield a false negative. (Zero is the "perfect" value for
both, however).

Both deployed and test `stbt.conf` files have been updated, along with
the selftests.

Note that with the introduction of MotionParameters, a bug was created with
`wait_for_motion` where if you specified motion_parameters but not a mask,
or specified them in the order, <parameters, mask>, then their values
were mixed up when passed to `detect_motion` because they were passed
positionally, not via keywords. Therefore, we `wait_for_motion` now
calls `detect_motion` explicitly with keywords.
Define ConfigurationError before a failed `get_config` can occur

If the stbt.py source code contains an invalid `get_config` e.g.
get_config("global", "invalid")
Then a `ConfigParser.Error` exception was caught so that we could raise
our own `ConfigurationError` exception.

However, *at import time* this hasn't be defined yet (it's during the
import that the exception is raised) and the Exception message
"NameError: global name 'ConfigurationError' is not defined"
is not useful to determining that the failure occurred because of an
invalid configuration parameters.

Note that this would never have leaked down to users because it is picked
up by `make check`, `make install`, etc. but it is useful for developers
to have the accurate Exception message.

Note also that I had to move `UITestError` as well because
`ConfigurationError` inherits from it, and consequently I moved the other
custom Exceptions so they remain grouped together in the source code.
MotionParameters.noise_threshold renamed MotionParameters.motion_threshold

This is to avoid confusion when users uses the legacy `noise_threshold`
parameter which raises a Warning telling the user it is deprecated and
to use `MotionParameters.noise_threshold` instead. It's much clearer to
just rename the parameter entirely.

The fact that the `noise/motion_threshold` is useful if you have a noisy
video to analyse is somewhat by-the-by; ultimately it controls how much
*motion* (difference between consecutive frames) is needed to pass the
motion detect test.

Note: When changing the name of the selftest functions I introduced an
underscore between "motion" and "threshold" so that it gets found when
doing a `(git) grep`.