Reordered two tests to do the faster one first.
Changed match_types to not mess with cast of IntImms.

Previously:

cast<uint16_t>(3) * some_uint8 -> uint8
3 * some_uint8 -> uint8

Now:

cast<uint16_t>(3) * some_uint8 -> uint16
3 * some_uint8 -> uint8
Allowed integer constants through lerp type checking.

Now you can write:

lerp(0, some_uint8, alpha)

without it complaining.