Fix issue 43.

Add support for generating either raw pointers or boost::optional for optional elements. Retain old functionality.