added a main class so this can be run standalone, plus a test for rebind (from aled), and a workaround so it is rebindable;
needs 860a40c731ee82d9a378cd7d0b44079bddeefc19 from brooklyn to work
reinstate strongly typed fields now that rebind issue is fixed, and minor tidies elsewhere