Support for custom cookie store

This is just #1192 with improved documentation.  @lalitkapoor quick review?