Add some doc examples to lib{green,native}

"How do I start in libX" is a common question that I've seen, so I figured
putting the examples in as many places as possible is probably a good idea.
auto merge of #12073 : alexcrichton/rust/doc-examples, r=cmr

"How do I start in libX" is a common question that I've seen, so I figured
putting the examples in as many places as possible is probably a good idea.