dwarf: sync getIdFromTrivialExpr with exprIsTrivial (test break028 and others)

Summary:
The bug manifests when built with
    EXTRA_HC_OPTS += -g

+++ ./ghci.debugger/scripts/break028.run.stderr 2014-12-19 23:08:46.199876621 +0000
@@ -0,0 +1,11 @@
+ghc-stage2: panic! (the 'impossible' happened)
+  (GHC version 7.9.20141219 for x86_64-unknown-linux):
+       getIdFromTrivialExpr x_alJ
+
+Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug
+
+
+<interactive>:3:1: Not in scope: ‘g’
+
+<interactive>:3:3: Not in scope: data constructor ‘False’

Signed-off-by: Sergei Trofimovich <siarheit@google.com>

Reviewers: simonmar, austin, scpmw

Reviewed By: scpmw

Subscribers: carter, thomie

Differential Revision: https://phabricator.haskell.org/D580