How do neurons operate on sparse distributed representations? A mathematical theory of sparsity, neurons and active dendrites