Better warnings for cross-type comparisons

Set the stacklevel when warning so there's a better chance of warning
about the correct caller. Also log a complete stacktrace.
Use a named logger
Merge pull request #21 from akshayjshah/warn

Better warnings for cross-type comparisons