Implement Theme.applyStyle() correctly.

Existing implementation only sets (and overrides) previous theme styles. Correct behaviour should overlay styles of the original Theme replacing original attributes conditionally when "force" == true.
Add overlayed styles to the end of the list not the beginning, the ones added later are the ones that are applied last.
Initialize attr array as empty array when passed in as null.
Only look up style resource if it could be resolved.
Rework how overlayed styles are applied in Robolectric.

ShadowAssetManager should keep a list of overlayed styles, but rather than trying to process them in the theme we should do so in ShadowResources since we need to resolve each attribute and any possible references through indirection at this point.
Merge branch 'master' of https://github.com/robolectric/robolectric into fix_theme_apply_style

Conflicts:
	src/test/java/org/robolectric/R.java
	src/test/java/org/robolectric/shadows/ResourcesTest.java
Fix merges from regenerated R.java file.
Merge pull request #1277 from jongerrish/fix_theme_apply_style

Implement Theme.applyStyle() correctly.