Document Deque trait and bitv.

Examples for `Deque`, `Bitv` and `BitvSet`. Normalize documentation style and some source code reorganization.
It's not a function renaming or logic change: it's just git's diff algorithm is getting slightly confused due to the `union` function being moved.