The derived contraction algebra