"Warnings as Errors" flag

 - Adds an option to cmake (WARNING_AS_ERROR) to report as error for each warning  (-Werror compiler flag). By default this flag is "OFF" but travis enables it for couple of build types.
 - This PR also fixes some warnings