SI-6955 switch emission no longer foiled by type alias

dealias the type of the scrutinee before checking it's switchable
now with tests! (using IcodeTest since javap is not available everywhere)
Merge pull request #1879 from adriaanm/ticket-6955

SI-6955 switch emission no longer foiled by type alias