bufferevent: allow setting priority on socket and openssl type (cherry picked from commit bdc5200acdf0a004ddc805b87bf09439fe2ebe7f)