[nix-mode] Add autoloads, make code more concise & idiomatic

- Use define-derived-mode to declare nix-mode
- Use autoloads to ensure nix-mode is usable (and enabled) without needing `require`
- Use set + make-local-variable instead of longer 2-step equivalent

(Background: I was handling this [request to add nix-mode to MELPA](https://github.com/milkypostman/melpa/pull/1751) and thought I'd send these fixes.)