Implemented to_json and from_json for Reference to fix edit xblock component.

STUD-2096

There was a JSON serialisation error on editing peer grading interface component, implemented to_json and from_json to fix this.