test for activemodel instead of rails for activemodel validations

There's a lot of use-cases where ActiveModel gets used without
including the full rails stack. Since nothing in activemodel validations
depends on rails, we can just test if activemodel is available before
including it, instead of testing for rails.