Refactor where.go

In preparation for configurable placeholders, make wherePart processing
lazier.