fix build problem on BSD & change CORK usage

We do no longer unconditionally apply the CORK option, as this may
result in subtle issues. Instead, we want the application to call
our new API for hinting librelp when it is OK to use CORK.

Also many thanks to Christiano for analysing and suggesting solutions
for a build problem on BSD.