custom JSON output for types `bool` and `option`

Merged E. Rivas requested to merge er433/fix/get-scope-json-bool+option into dev


For LIGO developers

As reported by Christian from discussion with serokell, there's a trouble when outputting JSON in ast_typed: bool and option are not printed accordingly.

This MR fixes the problem by doing the same we do for textual output ( we add custom cases for bool and option.

Changelog details:

Edited by Rémi

Merge request reports