Efficiency of Investment in Human and Physical Capital in a Model of Bilateral Search and Bargaining