Bug 1131 - yang-parser-impl cleanup

Fix small bugs (equals comparing incompatible types), null checks etc.
Fix import ordering.

Change-Id: I8c9f37e98542c63192ca8572edfd0de3643691cf
Signed-off-by: Tomas Olvecky <tolvecky@cisco.com>