The structural stability of topological cocycles