Use make_callable and no_op_value in rule.py too, move _none_or_index to pathutils.none_or_index too.