Refactor: Node Wrangler: PreviewNode operator
This commit refactors the PreviewNode operator so that code is
deduplicated between the Geometry Nodes and the shader branches.
- Extract `get_output_index()` and `create_links()` to methods to
avoid duplication in `invoke()`
- Return `{'CANCELLED'}` instead of `{'FINISHED'}` when there was no
change.
- Exit early when possible.
- Use `if ... is None:` instead of `if ...:` when applicable.
- Remove bits of unused code.
- Tweak comments and convert them to docstrings when extracted to a
function.
- Convert methods to `staticmethod`s or `classmethod`s when possible.