uncrustify source code and make C++11 compatible

- removed/replaced deprecated function calls and headers
- _should_ compile in C++11 and C++03 modes