Comparing the dynamics of periodically forced lasers and neurons