Use schema cache to look up predicate columns

This is required for compatibility with our weird AR hacks, but I thought I'd share it because it also provides a performance boost - your code was introspecting the schema every time it built a predicate.

I realise that this change isn't TDD'd - I hope you're forgive me. If it's any consolation it works really quite well in production.