Use BTreeSet instead of TreeSet.

TreeSet was removed from Rust https://github.com/rust-lang/rust/commit/6c00f9c5ff67ec1e206cd1e6e2db37df298f5d5b