Yang-Yang Functions, Monodromy and Knot Invariants