Methods and techniques for magnetic neural stimulation and recording