Add support for the getsid command

There has been Meterpreter work done as well to support this. But this
commit allows for a new 'getsid' command which tells you the sid of the
current process/thread. This can be used for things like determining
whether the current process is running as system. It could also be used
for golden ticket creation, among other things.
Idiomaticise the rubies
Land #4150, adds getsid command

Fixes #3787