Support diff for blobs

This adds support for running diff directly on blobs and also makes the necessary changes to diff implementation to reuse as much of the existing code as possible.