Updated documentation to refer to extra module

The documentation was still refering to getopts as though it was in the
std module - I've changed this to refer to extra instead.
Fix all issues with sample code

The getopts sample program now compiles and runs. Additionally I made
all of the indentation uniformly four spaces.
auto merge of #7035 : influenza/rust/getopts-doc-update, r=bstrie

The documentation was still refering to getopts as though it was in the
std module - I've changed this to refer to extra instead.