Improve CodingConvention#getPackageName impls + add tests.

Currently, the Google coding convention uses a source file's path as its package name. This is a problem for legacy directory layouts that place test files within test/ or testing/ subdirectories. (Closure places _test.js files in the same directory as source files, so it is unaffected.)

Currently, the default coding convention treats every source file as if it occupies a unique singleton package. If we added @package annotations to the Closure Library without changing this, compilation involving those parts of the library would fail. This CL makes the default coding convention use the source file's path as its package name, without the "test" exceptions of the Google coding convention.
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=68950652
Adds missing empty() method in externs for angular.JQLite.
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=68991398
Google coding convention: admit "tests" subdir as part of the same @package.
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=68998143
Fix the mismatch between the type annotation for formController.$error and the implementation. In the externs, it's defined as a !Object.<boolean>. According to the implementation, $error is an object hash, containing references to all invalid controls or forms, where:
- keys are validation tokens (error names),
- values are arrays of controls or forms that are invalid for given error name.
(If the validation token is valid, the value is false)
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=69000544
Adds xsrfCookieName, xsrfCookieHeader, and responseType fields to angular.$http.Config in the 1.2 and 1.3 externs.

See https://docs.angularjs.org/api/ng/service/$http
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=69010395
Tighten then Promise.prototype.then return type.
Fixes #476.
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=69024420
Remove outOfRange suppression
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=69025038