Update build script and tools to latest versions.

- Update gradle to 1.12.
- Use specific appcompat version.
- Use android gradle plugin 0.12.2.
Drop unused imports.