Add syntax extensions for lowercasing/uppercasing strings (Fixes #16607)

Testcase:

```
 #![feature(macro_rules)]
macro_rules! identify (
  ($i: ident) => {
    let $i = to_lower!(stringify!($i));
  }
)

fn main() {
    println!("{}", to_lower!("FooBar"))
    println!("{}", to_lower!(stringify!(FooBar)))
    println!("{}", to_upper!("FooBar"))
    println!("{}", to_upper!(stringify!(FooBar)))
    identify!(FooBar);
    println!("{}",FooBar)
}
```
There were more issues with `span` being taken from the wrong place (should
be `lit.span`, not the second value of `ExprLit`), but I fixed that.

Thanks for the help!

-Manish Goregaokar


On Thu, Aug 21, 2014 at 4:59 AM, Kevin Ballard <notifications@github.com>
wrote:

> In src/libsyntax/ext/source_util.rs:
>
> > +    };
> > +    match es.move_iter().next() {
> > +        Some(expr) => {
> > +            match expr.node {
> > +                ast::ExprLit(lit) => match lit.node {
> > +                    ast::LitStr(ref s, _) => {
> > +                        return base::MacExpr::new(cx.expr_str(sp,
> > +                            token::intern_and_get_ident(s.get().chars().map(transform).collect::<String>().as_slice())))
> > +                    },
> > +                    _ => ()
> > +                },
> > +                _ => ()
> > +            }
> > +        },
> > +        _ => ()
> > +    }
>
> Good catch, I meant to make that span. I'll edit my comment.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/rust-lang/rust/pull/16636/files#r16512839>.
>