Miscellaneous doc fixes

There were a few places mentioning `NULL` when it should be `None` in python, and `nil` in ruby.

There was a broken query in the `match` documentation that would error, which has been fixed.

The python documentation had an unclosed set of quotes which messed up some formatting.

The ruby documentation had a couple out-of-place headers in the middle of a section.