cmake: Remove all warnings at compilation

This commit removes all compilation warnings in every build type.
It also adds CMake option ENABLE_WERROR of treating compilation warnings as
errors.
Due to some bug in gcc in versions < 4.7, '-pedantic' flag is disabled when
ENABLE_ERROR is set.

Change-Id: I4252715a7d6b9b1b19b63add7cb02563abc4ac1c