Allow Bucket.ofType to accept strings.
Fix signature bug with repeated bucket type on certain backend calls.

Add handling for the special bucket index '$bucket'.