Do not retain namespace context when not needed
If we have not recorded presence of a literal expression, there
is no legal way we can be asked to resolve a literal to either
a QName or a YangInstanceIdentifier.
Track creation of YangLiteralExprs, so that we can ditch the
namespace context we will not need it.
JIRA: YANGTOOLS-1115
Change-Id: If1572fc57d78eaaea7feb3025a5a161519df2b9a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
1cfaa0281c43f939cd64261e1605e8757d39aa2f)