Fix editing of VRF in web UI

Used the wrong input name.

Also make statistics JS conditional to prevent javascript error.

Fixes #575.
Merge pull request #576 from plajjan/575-fix-vrf-edit

Fix editing of VRF in web UI