Apache Licence V2

Changed licence to AL V2 - to be compatible with CouchDB licence.