Cleaned up query and update quotation parser implementations

Moved the query and update components into separate files since they were no longer dependent on the `bson` function. Removed usages of `failwith` in favor of returning an option type to indicate success vs failure.