API: Support inequalities in templates

This adds support for <, <=, >, >= in templates