First pass at plugin reorganization

- Introduces functions.php and moves general utility functions to this file,
  renamed in the global namespace
- Introduces admin.php, for setting up and controlling the Dashboard interface,
  and moves all admin-specific methods there

Fixes #40