Rewrite vec.contains() to be simpler
Implement new methods vec.starts_with()/vec.ends_with()
Rewrite str.starts_with()/ends_with() to be simpler
auto merge of #9907 : kballard/rust/vec_ends_with, r=alexcrichton
auto merge of #9908 : alexcrichton/rust/snapshots, r=thestinger
Use __morestack to detect stack overflow

This commit resumes management of the stack boundaries and limits when switching
between tasks. This additionally leverages the __morestack function to run code
on "stack overflow". The current behavior is to abort the process, but this is
probably not the best behavior in the long term (for deails, see the comment I
wrote up in the stack exhaustion routine).