Merge pull request #1344 from reaperhulk/bn-ctx-fix

start and end BN_CTX so BN_CTX can track func owner of temporary BNs