Allow array or hash syntax for partial index conditions

This is the newer version of #13353, based off of the latest master. It allows you to replace these migrations:

```ruby
add_index :foos, :user_id, unique: true, where: "status IN (0, 1)"
```

With this:

```ruby
add_index :foos, :user_id, unique: true, where: { status: [1, 2] }
```

It understands any Array that `ActiveRecord::Sanitization.sanitize_sql_array` accepts, and any Hash that `ActiveRecord::PredicateBuilder` accepts. It would've been great to just use `ActiveRecord::Sanitization.sanitize_sql_for_conditions` directly, but its implementation of `sanitize_sql_hash_for_conditions` assumes it is being called from within a `ActiveRecord::Base` class, which this is not. Figured this was a reasonable first pass!
You should be able to pass `nil` for the class, rather than `ActiveRecord::Base`