Feature/taxrefine plus cartodb

Fixed a potential (but probably rare?) bug which could leave the synonym count in an inconsistent state.