firewall: refactor port ranges to use attributes.

Based on a suggestion from Eelco. This is also more type safe for users.

Signed-off-by: Austin Seipp <aseipp@pobox.com>