added some c++ goodness

various, including but not limited to:
 * updates .travis.yml to support using the build tools that Travis has
 * updates configure.ac to detect the M_PI constant
 * changes various source files to include c++ headers and call c++ math functions