Refactor completion numbers and rate to share code

Move the work done on the completion rate graph into completion and make
it generic enough that it can also be used for the completion numbers
module. This means neither module will now have any hard coding on the
period or length of data which they can display. It also means they push
all the bucket size work off to backdrop rather than doing it
themselves.