build: add -std=c++03 (in non C++11 mode) and -pedantic to the default CXXFLAGS

And fix the resulting warnings. The long-long-int warning is explicitly
suppressed because it's not trivial to workaround in a platform-independent
and ISO-conformant way without using C++11.

This commit also includes fix for the advisory check for C++11-enabled
compiler in common.hpp (gcc < 4.7 does not correctly define __cpluplus
macro).

Finally, when custom CXXFLAGS are specified, --with-c++11 does not force
-std=c++11 or -std=c++0x flags, but just performs mandatory checks for
std::shared_ptr and std::function.

Change-Id: Icf44627edfddd34301bd27a05882b62fcbf54329
diff --git a/src/encoding/tlv-nrd.hpp b/src/encoding/tlv-nrd.hpp
index 6dcbbfd..9ca1a65 100644
--- a/src/encoding/tlv-nrd.hpp
+++ b/src/encoding/tlv-nrd.hpp
@@ -23,12 +23,12 @@
   Cost             = 104,
   ExpirationPeriod = 105,
   StrategyName     = 106,
-  Protocol         = 107,
+  Protocol         = 107
 };
 
 enum {
   NDN_FORW_CHILD_INHERIT = 1,
-  NDN_FORW_CAPTURE       = 2,
+  NDN_FORW_CAPTURE       = 2
 };
 
 } // namespace nrd