Flags labeling

I refactored this changeset so that it now uses the flags field and applies labels to bugs for each different flag.
![flag_labeling](https://f.cloud.github.com/assets/5017470/1479608/8e36eb78-4688-11e3-9e2d-1988356cab89.png)