Sum active/inactive bug counts and use lifecycles to get statuses

The hardcoded statuses missed the "patched" status; using lifecycles
fixes it.