BasicSocket#shutdown should accept strings or symbols

Fixes #1579