Adds support for union and range

Summary: The support is needed for the session API yang spec.

Test Plan: use when testing session api

Reviewers: hsychla

Reviewed By: hsychla

CC: aschultz, druss

Differential Revision: https://review.tpip.net/D370