Replace dyn_cast<T>s immediately followed by asserts with cast<T>s.

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@205641 91177308-0d34-0410-b5e6-96231b3b80d8
useNew is set to false in all branches, so set it to false outside the if-else.

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@205642 91177308-0d34-0410-b5e6-96231b3b80d8