fix a reference cycle in the popup button
move most common initializers to static functions
move BTRImageView's common initializer to a static function, fix bug
Fix build when prefix header is disabled.