ControBoardWrapper2: Big refactor of code, split it in more files and moved
implementation from .h to .cpp

This has been done because this object has grown too much to be readable anymore
and those 2 files contained a lot of herlper subclasses, now each of them has its
own file.

NAMES of subclasses and variables has been changed to reflect what they do and
have them more intuitive.
ControlBoardWrapper2: added state extended port and ROS topic

2 new flags i CMake to enable those features

- CBW2_USE_YARP_THRIFT: enables the stateExt:o port. It will use the .thrift file
  to generate the class sent through the port. The structure of the class is the same
  as the ROS jointState message, just with a different name.

- CBW2_USE_ROS_MSG: enables the creation of the ROS topic. It will use the .msg file
  to generate the correct message understandable from a ROS subscriber.
  In this case I used the jointState message type, one of the 'native' msg of ROS
  documented here http://docs.ros.org/api/sensor_msgs/html/msg/JointState.html

- If both are enabled, the class generatd by the ROS .msg is used in both cases, for
  the ROS topic and the yarp extended port. In this case the header is filled with zeros

This has been tested with a simple ROS subscriber made following the ROS tutorials
found here http://wiki.ros.org/ROS/Tutorials/WritingPublisherSubscriber(c%2B%2B).
It also works when reading back the topic from yarp with
yarp read ... /topic@/node
when yarpidl_rosmsg is active like shown in http://wiki.icub.org/yarpdoc/yarp_with_ros.html

TODO: fix segfault while closing ...
ControlBoardWrapper2: Fix in the CMakeFile...

 btw the CMake should be better and more robust, this is a WIP
some cleaning
Revert ../conf/template/placeGeneratedYarpIdlFiles.cmake.in as it is on master
Now it works, only problem it requires a 2 step compilation:

first compile everything without the ros/yarp idl msg, after the compilation
is finished, enable the ros/yarp idl msg and recompile.
Trying to fix this issue.
ControlBoardWrapper2 & RemoteControlBoard update on extended state port:

- moved config msg from ControlBoardWrapper folder to a specific folder since they are used by both
CBWrapper and RemoteControlBoard (are not private stuff of the CMB2)
- expanded the .thrift to include acceleration and pidOutput (suggested by Randazzo)
- Filled the message with real values from device
- Moved RemoteControlBoard to a folder under module like the CBW2
- Create stateExtendedReader.cpp to read and buffer values from the extended port, like the
StateInputPort was already doing for the standard state port.
Add already generated files for CBW2/remoteCB messages, both yarp and ros
Fix wrong getLast function

Better cmake, add include guards on stateExtendedReader
Moved the opening of the port in the attach function so that subdevice is fully initialized when they opens
Merge branch 'master' into newOutput branch

Conflicts:
	conf/template/placeGeneratedYarpIdlFiles.cmake.in
	src/libYARP_dev/src/modules/ControlBoardWrapper/ControlBoardWrapper.cpp
	src/libYARP_dev/src/modules/RemoteControlBoard/RemoteControlBoard.cpp
Few fixes
Fix error on setControlMode group
Changed to use the yError msg style. fix (again) the commented out checkMotionDoneGroup
Importing changes missing from last merge
code cleaning
Merge branch 'ControlBoardWrapper2_NewOutputPort' of https://github.com/robotology/yarp into ControlBoardWrapper2_NewOutputPort
Removed spurious file, fix missing declaration in ControlBoarWrapper2
Add envelope to stateExt:o port, fix portName for stateExt:o
[thrift] match spec for oneway behavior, see #323