Cherry-picked 12e6ada259c38d535003c068a49bc525c33830d8 into 2.3.
Since the maxctrl build process uses add_custom_command, we must
explicitly list the sources that it depends on. With this change, maxctrl
is rebuild whenever the sources change.
Instead of using the correct version in in-source builds, a dummy file is
copied in place. This removes the need to explicitly include the
VERSION.cmake file.
Displaying the MaxScale version helps identify which package the
executable was bundled with. As the MaxCtrl source is a part of MaxScale,
there's no need for separate versioning.
Moved MaxCtrl into a separate package to simplify packaging and
distribution process. Having the client as a separate component allows one
set of packages to be used on multiple platforms.
As the REST API is a part of the core, it is more appropriate for the
tests to reside there as well. Further refactoring of the testing needs to
be done to allow multiple components to use the same framework but with
different tests.