Remove `engine` from `TreeManager` and subclasses

This constructor parameter was unused for everything except the
convenience methods `to_sql` and `where_sql`. We can pass the engine
into those methods directly.