Made ActiveRecord::isPrimaryKey() public

+ added tests and fixed behavior

Need this for redis implementation.