Implement select via libgo

Implements select, and some misc. improvements. The debug metadata change fixes a bug that triggered with selects with default cases.