Background queue implementation

is not linked in to the rest of the code. mostly a useful code base for
using comparator based painting