Generalize jQuery matching for non Spark-core API docs

Other modules have slightly different DOM trees, so this PR generalizes the matching to accommodate for this. Further, for methods, both annotations and comments show up on the docs, leading to duplicate badges. Chaining the containers appropriately fixes this.