fixes #4703 - reset_counters doesn't work for has_many :through relationships on rails 3.2.8
Fixes #4680 - Don't append periods to unqualified unmanaged hosts