Implement a lint mode to detect unnecessary allocations
Remove all unnecessary allocations (as flagged by lint)
auto merge of #6647 : alexcrichton/rust/unnecessary-alloc, r=bstrie

This adds a lint mode for detecting unnecessary allocations on the heap. This isn't super fancy, currently it only has two rules

1. For a function's arguments, if you allocate a `[~|@]str` literal, when the type of the argument is a `&str`, emit a warning.
2. For the same case, emit warnings for boxed vectors when slices are required.

After adding the lint, I rampaged through the libraries and removed all the unnecessary allocations I could find.