Added consif and conswhen.
Added exports for consif and conswhen.
Added tests for consif and conswhen.
Redefined consif in terms of conswhen.