Never allow AR's connection's open_transactions to dip below 0

Stopgap for #3428

Conflicts:
	backend/spec/spec_helper.rb
	frontend/spec/spec_helper.rb