Cleanup
Export idl targets

This allows to use them in commands without finding them first by using
the target name (i.e. YARP::yarpidl_thrift and YARP::yarpidl_rosmsg)
CMake bug #14864 is fixed in CMake 3.1
YarpOptions requires that YarpSystemCheck is called before

In order to set build flags, WANTED_WARNING_FLAGS should be set, and
therefore YarpSystemCheck should be called before YarpOptions.

Commit 12ceb610eb686697be0d292314d9fd089dd18d32 disabled all build flags
except for the ones depending on the CMAKE_CXX_FLAGS (and similar)
variable.
Fix -Wsign-compare warnings
Fix -Wformat warning
Fix -Wunused-variable
Fix a few "ordered comparison of pointer with integer zero [-Wextra]" warnings
Fix -Wunused-private-field warning
Fix -Wunused-private-field warning
Fix -Wunused-private-field warning
Fix several -Wtautological-undefined-compare warnings