[DF-2707] use reference counting as a part of TextureBucket
[DF-3394][DF-3392] remove unused code