refactor freebsdports._write_options()

Avoids shadowing the `config()` function. Also avoid redundant sorting.