add optional pre_releases argument to gem.install

Fixes #14469