Added support for building project using gradle.

Added support for building project using gradle. Changes are backward compatible and still allow building using Eclipse and old style project structure.

Consider pulling this request to allow others who use gradle for builds to more easily contribute to this project. Eventually it is suggested to change project structure to match the new project structure used by Android team and the default for gradle projects.