Essays on a mechanism design approach to the problem of bilateral trade and public good provision