Fix three test failures on older and c++03 compiler.

This PR contains various commits since merge back master into develop to be consistent with master branch.

The key commits of this PR are following.
- f73b536 Fix test error with C++03 mode, due to C++11 using-declaration.
- 1b4acaa Fix unexpected lookup failure with GCC < 4.5.
- 2661fc7 Change the result_of behaviour with BOOST_RESULT_OF_USE_DECLTYPE