fix static analyzer warnings
added some X_ref typedefs for std::shared_ptr<X>
added date_range::infinity()
more hacking on the mac app