Lift the type test from runtime to compile-time

This implements the idea described in https://github.com/tkawachi/sbt-doctest/issues/33#issuecomment-57694974 and it also fixes #33.