Git-ignore files generated during Gradle build

These are some of the files/dirs (that you wouldn't want to check-in to
source-control) that I see after getting the gradle-build going:

#	.gradle/
#	core/KDFCTR.gen
#	core/KDFDblPipelineCounter.gen
#	core/KDFDblPipelineNoCounter.gen
#	core/KDFFeedbackCounter.gen
#	core/KDFFeedbackNoCounter.gen
#	core/build/
#	mail/build/
#	pg/build/
#	pkix/build/
#	prov/build/
Gradle: Specify version of JUnit to avoid unreproducible builds

Another reason for this change is that it stops Gradle from making
unnecessary trips to the network to verify if it has the latest version
of JUnit. ie, on my laptop, even after many successful builds, it was
still possible to get this error if disconnected from the internet:

--
$ gradle test

FAILURE: Build failed with an exception.

* What went wrong:
Could not resolve all dependencies for configuration ':core:testCompile'.
> Could not resolve junit:junit:4.+.
  Required by:
      spongycastle:core:1.50-b01
   > Failed to list versions for junit:junit:4.+.
      > Could not list versions using M2 pattern 'http://repo1.maven.org/maven2/[organisation]/[module]/[revision]/[artifact]-[revision](-[classifier]).[ext]'.
         > Could not GET 'http://repo1.maven.org/maven2/junit/junit/'.
            > repo1.maven.org
--
Format cert-revocation date in GMT to avoid timezone-dependent tests

In my London-based JVM, the date was actually Apr 19th, and the
asserted string in NistCertPathTest did not match.

This is an alternative to this prior pull-request, which just relaxed
the test condition to ignore the date:

https://github.com/bcgit/bc-java/pull/45#issuecomment-31311148
Fix BcCertTest to use PEMData class that is within the pkix project

There are at least two identical PEMData classes, this test failed to
compile because it was using the one defined by the 'prov' tests, rather
than 'pkix'.
Move core->pkix: FileDaFirmare test resources required by PKIX

core:src/test/data/org/bouncycastle/tsp/test/FileDaFirmare.data

used by

pkix:org.bouncycastle.tsp.test.CMSTimeStampedDataGeneratorTest
Move prov->pkix: tests for OCSP, which is in pkix

The tests use classes from pkix, eg:

prov/src/main/java/org/bouncycastle/ocsp/Req.java
Move core->pkix: PSS test-resourses required by BcSignedDataTest

pkix/src/test/java/org/bouncycastle/cms/test/BcSignedDataTest.java

BcSignedDataTest. testCounterSig
BcSignedDataTest. testEncapsulatedSample
BcSignedDataTest. testSamples
Move core->pkix: test-resources required by org.bouncycastle.eac.test.AllTests

pkix/src/test/java/org/bouncycastle/eac/test/AllTests.java
Move core->prov: test-resources for org.bouncycastle.jce.provider.test.rsa3.RSA3CertTest

prov/src/test/java/org/bouncycastle/jce/provider/test/rsa3/RSA3CertTest.java

org.bouncycastle.jce.provider.test.AllTests > org.bouncycastle.jce.provider.test.rsa3.RSA3CertTest.testI FAILED
org.bouncycastle.jcajce.provider.asymmetric.x509.CertificateFactory$ExCertificateException at RSA3CertTest.java:113
Caused by: java.io.IOException at RSA3CertTest.java:113

org.bouncycastle.jce.provider.test.AllTests > org.bouncycastle.jce.provider.test.rsa3.RSA3CertTest.testJ FAILED
org.bouncycastle.jcajce.provider.asymmetric.x509.CertificateFactory$ExCertificateException at RSA3CertTest.java:113
Caused by: java.io.IOException at RSA3CertTest.java:113
Gradle: set bc.test.data.home system property

Defining the test data path relative to project

http://www.gradle.org/docs/current/javadoc/org/gradle/api/Project.html#file(java.lang.Object)
Fix some "no such provider" initialisation errors in tests

Caused by: java.security.NoSuchProviderException: no such provider: BC
	at sun.security.jca.GetInstance.getService(GetInstance.java:83)
	at sun.security.jca.GetInstance.getInstance(GetInstance.java:206)
	at java.security.Signature.getInstance(Signature.java:355)
	at org.bouncycastle.jcajce.NamedJcaJceHelper.createSignature(NamedJcaJceHelper.java:95)

Fix org.bouncycastle.tsp.test.NewTSPTest:

org.bouncycastle.tsp.test.NewTSPTest > testGeneral FAILED
    java.lang.ExceptionInInitializerError
        at org.bouncycastle.tsp.test.NewTSPTest.testGeneral(NewTSPTest.java:64)
        Caused by:
        java.lang.RuntimeException: java.security.NoSuchProviderException: no such provider: BC
            at org.bouncycastle.tsp.test.TSPTestUtil.<clinit>(TSPTestUtil.java:86)
            ... 1 more

java.security.NoSuchAlgorithmException: MD5WithRSAEncryption Signature not available
	at java.security.Signature.getInstance(Signature.java:224)
	at org.bouncycastle.x509.X509Util.getSignatureInstance(X509Util.java:190)
	at org.bouncycastle.x509.X509Util.calculateSignature(X509Util.java:223)
	at org.bouncycastle.x509.X509V3CertificateGenerator.generate(X509V3CertificateGenerator.java:434)
	at org.bouncycastle.x509.X509V3CertificateGenerator.generate(X509V3CertificateGenerator.java:412)
	at org.bouncycastle.tsp.test.TSPTestUtil.makeCertificate(TSPTestUtil.java:196)
	at org.bouncycastle.tsp.test.TSPTestUtil.makeCACertificate(TSPTestUtil.java:155)
	at org.bouncycastle.tsp.test.NewTSPTest.testGeneral(NewTSPTest.java:65)
Formatting
Refactoring of the Nat* classes
Merge branch 'gitignore-generated-files' of git://github.com/rtyley/spongycastle
Merge branch 'specify-exact-junit-version' of git://github.com/rtyley/spongycastle
Merge branch 'fix-bccerttest-pemdata-import' of git://github.com/rtyley/spongycastle
Merge branch 'move-test-resources-to-correct-modules' of git://github.com/rtyley/spongycastle
Merge branch 'set-test-data-home-in-gradle' of git://github.com/rtyley/spongycastle
Update version and fix formatting
Fix line endings