Add reference counting back to BitmapReference
Refactor BitmapFactory for extensibility