BST.py: implement BST as a class

Signed-off-by: Luo Chunbo <luochunbo@gmail.com>