what is epilepsy and how is it diagnosed