Close requests session in `search` command

* Added a `with` block to handle `session` life-cycle. As commented
  in #1902