Untangling Dense Non-Planar Knots by Learning Manipulation Features and Recovery Policies