Made several BIO functions have signatures which are consistent with their documentation

`BIO_ctrl` returns a `long`, while these are all documented as returning `int`.