EncryptedRandomAccessThing and other API's from my GSoC project

This is EncryptedRandomAccessThing which toad will be using in his db4o replacement along with around half of the API I have written this summer for GSoC. ERAT is dependent on the three API's included. I am still in the process of writing docs and unit tests for ERAT but the other three APIs are complete. These will be done this weekend. This requires BouncyCastle 1.51 (#271).
I'm concerned there might be a race condition here. Consider:

1. Another thread checks `isClosed`, finds it to be `false` because this line isn't hit yet.
2. This thread completes close().
3. The other thread continues on to use cipherWrite / cipherRead; gets an NPE.