The evolutionary origins of cognition : understanding the early evolution of biological control systems and general intelligence