Fixed #23493 -- Added bilateral attribute to Transform

https://github.com/django/django/pull/3284 is a prerequisite for that PR as `PatternLookup` uses the same mechanism to turn a "transformed" rhs into some SQL as it does for an `F` expression (relying on `pattern_ops`).

I should also do something about `get_db_prep_lookup` which should not escape and turn the rhs into some `%%%s%%` when using a pattern lookup (e.g. `contains`) as this is handled by `PatternLookup`.

I should work on that soon and update that PR.
is this comment still accurate? would be nice to resolve it now.