Merge pull request #5 from ajbeamon/master

New contract for FdbKey.Increment
Fixed Select(...).Take(N) that was not working properly

- added a unit test that constructs random LINQ queries and validates them against LINQ to Object
Merge branch 'master' of github.com:Doxense/foundationdb-dotnet-client
Fixed unit test following change in contract for strinc/FdbKey.Increment
FdbKeyRange.PrefixedBy("\xFF") should return [ "\xFF\x00", "\xFF\xFF" )
Validates values for SetLocationCacheSize and SetMaxWatches
Fixed broken tests due to recent changes
Fixed bugs in SliceListStream
Added unit tests for SliceStream and SliceListStream
Fixed incorrect byte ordering in Slice.FromFixedU64 + test
Fixed Slice.FromStreamAsync

- must call stream.CanRead before, because stream.Length will throw if stream is Disposed
- fixed chunk size bug in LoadFromBlockingStreamAsync
- added unit tests
Fixed Slice.ToGuid/ToUuid encoded as strings

- size is 36 and not 44 !
Moved FdbCounter into Common Layers assembly

- This is deprecated so should not be in the core client.
Fixed invalid prototype for FdbKey.Merge(Slice, Slice[])

- this method does not need to be generic !
- added unit tests
Removed unused methods from Slice and added more unit tests
Fixed Uuid comparison and Node property + tests
Added property FdbDatabase.Directory to attach a global directory on a database instance

- db.UseDirectory(..., ...)
- db.Directory.CreateOrOpenAsync(...)
Updated DirectoryLayer

- Most async methods accept a CancellationToken
- Changed RemoveAsync to return true/false (and not throw if not found)
- Fixed ArgNullEx in RemoveAsync
Renamed db.Directory to db.Root, and changed into a FdbRootDirectory that wraps the Directory and the database

- db.Root.CreateOrOpenAsync(("Foo"), ...)
- By default mapped to use the default directory location
Fix problem when calling ClearRange(StartWith(key)) if key is equal to the GlobalSpace prefix

- StartWith(GlobalSpace.Key) calls FdbKey.Increment(...) and so returns a key that is outside the allowed keys.
- When we now it is safe, we will allow that key to be used
- Now db.ClearRangeAsync(db.GlobalSpace) should work