add calls to jl_exception_clear to interface functions with try blocks

this prevents swallowed exceptions from appearing as errors when you
call jl_exception_occurred.
use LLVM intrinsic for sqrt. helps #6112