Don't use Scala reflection for asInstanceOfOpt

asInstanceOfOpt is broken by trying to be too smart. There is no point
in using runtime reflection for subtype checks, since the value on which
we reflect only carries the erased type anyway. Simplified to use
`ClassTag` and documented the behavior. (and got rid of two deadlocks)

Fixed #1002128, #1002152
missing `=`