WebSearch: of=recstruct in websearch

* Handles of=recstruct but outputting the json representation of a recstruct.
* Modifies print_record to return the json representation of a recstruct
  when it is called with format=recstruct (it was previously returning a
  dictionary)
* Modifies print_record to remove the protected fields from the recstruct
  when format=recstruct is used.

(fixes #1712)

Signed-off-by: Alessio Deiana <alessio.deiana@cern.ch>