Add Python based scripting system (still experimental).

The build system has also been revamped considerably, with the ability
to select between std::shared_ptr and boost::shared_ptr, as well as
other improvements.