An egalitarian network model for the emergence of simple and complex cells in visual cortex