select.c: Evaluate constant WHERE expressions only once

Expressions not including any field references are considered constant.

Signed-off-by: Morten Hustveit <morten.hustveit@gmail.com>