Sleeping Networks: A Computational Model And Algorithm For The Role Of Sleep In Learning And Memory