rewrite Barcode_report in python

Adds a bit more flexibility (so that maintenance isn't such a headache), fixes a NoIndex bug, supports JSON output so we can upload to LIMS more easily.

@akjohnson Not sure if you want to review this, it works fine for me, and only touches barcode stuff.