I'm interested in the complexity of deciding whether a given non-simple polygon is almost simple, in either of two different formal senses: weakly simple or non-self-crossing. Since these terms are not widely known, let me start with some definitions.
A polygon $P$ is the closed cycle of line segments connecting some finite sequence $p_0, p_1, p_2, \dots, p_{n-1}$ of points in the plane. The points $p_i$ are called the vertices of the polygon, and the segments $p_i p_{i+1\bmod n}$ are called its edges. We can specify any polygon by just listing its vertices in order.
A polygon is simple if all $n$ vertices are distinct and edges intersect only at their endpoints. Equivalently, a polygon is simple if it is homeomorphic to a circle and every edge has positive length. In general, however, the vertices and edges of a polygon may intersect arbitrarily, or even coincide.1
Consider two polygonal paths $A$ and $B$ whose intersection is a common subpath of both (possibly a single point). We say that $A$ and $B$ cross if their endpoints $A(0), B(0), A(1), B(1)$ alternate on the boundary of a neighborhood of the common subpath $A\cap B$. A polygon is self-crossing if it has two crossing subpaths and non-self-crossing otherwise.2
A polygon is weakly simple if it is the limit of a sequence of simple polygons, or equivalently, if there is an arbitrarily small perturbation of the vertices that makes the polygon simple. Every weakly simple polygon is non-self-crossing; however, some non-self-crossing polygons are not weakly simple.
For example, consider the six points $a,b,p,q,x,y$ shown below.
The polygon $abpqyz$ is simple; see the left figure.
The polygon $papbpqyqzq$ is weakly simple; the middle figure shows a nearby simple polygon. However, this polygon is not simple, because it visits $p$ three times.
The polygon $papbpqzqyq$ is self-crossing, because the subpaths $bpqz$ and $yqpa$ cross. See the right figure for some intuition.
Finally, the polygon $papbpqyqzqpapbpqyqzq$ (which winds twice around the middle polygon) is non-self-crossing, but it is not weakly simple. Intuitively, the turning number of this polygon is $\pm 2$, while the turning number of any simple polygon must be $\pm 1$. (A formal proof requires some case analysis, in part because the turning number is not actually well-defined for polygons with $0^\circ$ angles!)
Update (Sep 13): In the figure below, the polygon $abcabcxyzxpqrxzyx$ is non-self-crossing and has turning number 1, but it is not weakly simple. The polygon arguably has several crossing non-simple subwalks, but it has no crossing simple subpaths. (I say "arguably" because it's unclear how to define when two non-simple walks cross!)
So finally, here are my actual questions:
How quickly can we determine whether a given polygon is non-self-crossing?
How quickly can we determine whether a given polygon is weakly simple?
The first problem can be solved in $O(n^5)$ time as follows. Since there are $n$ vertices, there are $O(n^2)$ vertex-to-vertex subpaths; we can test whether any particular subpath is simple in $O(n^2)$ time (by brute force). For each pair of simple vertex-to-vertex subpaths, we can test whether they cross in $O(n)$ time. But this can't be the best possible algorithm.
I don't know whether the second problem can be solved in polynomial time. I think I can quickly compute a well-defined turning number for any non-simple polygon (unless the union of polygon edges is just a path, in which case the polygon must be weakly simple); see my answer below. However, the new example polygon above implies that non-self-crossing and turning number 1 does not imply weakly simple.
We can determine whether a given polygon is simple in $O(n^2)$ time by checking every pair of edges for intersection, or in $O(n\log n)$ time using a standard sweepline algorithm, or even in $O(n)$ time using Chazelle's triangulation algorithm. (If the input polygon is not simple, any triangulation algorithm will either throw an exception, infinite-loop, or produce output that is not a valid triangulation.) But none of these algorithms solve the problems I'm asking about.
1 Branko Grünbaum. Polygons: Meister was right and Poinsot was wrong but prevailed. Beiträge zur Algebra und Geometrie 53(1):57–71, 2012.
2 See, for example: Erik D. Demaine and Joseph O'Rourke. Geometric Folding Algorithms: Linkages, Origami, Polyhedra. Cambridge University Press, 2007.