Fix subtyping between functions, dotted on left, ordinary on right

Move to core.contracts