Added invalidation and cancelation of NSURLSession

Added cancelation in dealloc to avoid memory leaks. Started using weak+strong references for avoiding possible retain cycles in Blocks.