Evolution towards increasing complexity through functional diversification in a protocell model of the RNA world