mongodb cart: clean up `mongodb_context`, `rhcsh`

Integrating Miciah's suggestions to simplify `update_configuration` and
`rhcsh` `mongo` function - smarter path element generation and more
correct handling for empty `ld_path` variables