Add type cast operators to concurrent objects

Implement type casting operator to allow implicit cast from a Concurrent
resource, writer or reader of a type U to a type T. This avoids the use
of getConcurrentReader and getConcurrentWriter methods, and helps to
reduce the code size.

This closes #4