WIP records: REST API addition

I know but it was what worked for me. Otherwise i could not set the headers to return anything else, even though i was specifying `text/xml` flask was returning `application/json`. I can have a look again. In any case, discussing with Tibor,
we concluded that when `application/json` is asked then `json (<dict>)` should be returned and for any other format we will give back the result of `format_record` which is `string`