General Method to Determine the Flux of Charged Molecules through Nanopores Applied to β-Lactamase Inhibitors and OmpF.