mavenizing scrooge

RB_ID=75580
Add setter for ThriftServer.server
Rename the AST object in handlebar/Parser, so as not to be confused with the AST in scrooge-generator

RB_ID=78809
 add a header that looks like the following to each generated file, indicating Scrooge version.
     /**
      * generated by Scrooge Version XXX
      */

RB_ID=79570
mavenize scrooge tests
change MustacheLoader's getHeader method to a val

RB_ID=80057
add getMessage(), when possible, to generated Exception structs

http://jira.local.twitter.com/browse/CSL-243

RB_ID=81267
delete TemplateSpec. It was the old way when Scrooge used com.twitter.util.Eval for templates instead of mustache.

RB_ID=82445
Scrooge parser will reject oneway functions. As well as some

RB_ID=82546
refactoring:
- frontend: to parse Thrift files. It includes Importer and ThriftParser(formerly ScroogeParser)
- mustache: everything related to mustache, including template parser, loader and former handlebar stuff
- ast: AST.scala. This will be broken into multiple files, thus a package of its own
- backend: code generation stuff including Generator, JaveLike, JavaGenerator, ScalaGenerator, ServiceTemplate, StructTemplate

RB_ID=86686
Really fixing the relative path include
Scrooge could parse relative paths in the include statements. However when it generates the prefix for the included file, it doesn't deal with relative path. In result, when referring to the definitions in the included file, since the prefix is wrong, TypeResolver can't find it and throws an UndefinedSymbolException.

RB_ID=85782
DirImporter didn't resolve absolute file path
I forgot to deal with absolute path in the DirImporter.resolve(filename).

RB_ID=90655
Major refactoring:
- Enrich AST.
- Identifier now becomes superclass of SimpleID and QualifiedID. The ThriftParser will create them. And we rely on Scala static typing to ensure correct usage of ids.
- Move ID manipulation(concatenation, case conversion, keyword rewriting etc) to Generator phase. They used to be all over and dealt with in an ad hoc fashion, such adding prefix/postfix in mustache template. This change makes it easier to maintain the code base and less error prone
- The dictionaries that the mustache templates use are nested, and a lot of key names were used repetitively (eg: "name" can stand for struct name, function name, constant name). I gave nested keys distinct names to avoid confusion.

RB_ID=87048
super basic annotations support

RB_ID=88644
preserve leading underscores when (camel|title)casing identifiers

RB_ID=91189
added aliased imports to services and fixed brace placement

RB_ID=91249
Make thrift idl-defined exceptions inherit ThriftException trait, so that users can simply match a general ThriftException rather than specific generated classes.

RB_ID=92339
make exceptions inherit from ThriftException, also in the vanilla interface

RB_ID=92339
missed case conversions
Discovered by compiling a thrift file like this:
    enum ThriftID { ... }
    struct ThriftRequest {
      ...
      2: ThriftID clientID
      ...
    }
Note that "ThriftID" changed to title case is "ThriftId". The generated code would use "ThriftId" in the object definition, but "ThriftID" when referred to as a type in various places.

RB_ID=93320
cross file service inheritance

 if thrift file says
   include "foo.thrift"
   service BarService extends foo.FooService { ... }

 The generated code does not put qualifier in front of FooService. It is now:
    object BarService {
     trait Iface extends FooService { ...}
     ...
   }

 But it should have a scope qualifier:
   object BarService {
     trait Iface extends foo.FooService { ...}
     ...
   }

RB_ID=93447
change the dogfood version from 3.0.2-SNAPSHOT to 3.1-SNAPSHOT.
As we go forward, we'll be releasing 3.0.X to github so that external users, if any, can pick up our changes.
Meanwhile internal dogfooding version stays the same 3.1-SNAPSHOT until Scrooge 3.1 is ready to officially release(which means DevProd team integrates it in Birdcage and Science)
add a "strict" mode to deal with parse warnings such as oneway modifiers.
When the strict mode is on, Scrooge throws exceptions; when it's off, Scrooge prints out the error message and continue compiling

RB_ID=93547