Move common cmake rules to modules.

Same mech as in `cmake_modules` package.
Issue #139.
extras: Use cmake modules.

Issue #139.
cmake: Add check MAVLINK_DIALECT value

Fix #139.