Implement factor out of deterministic expressions, fix https://github.com/julianhyde/linq4j/issues/17