The complexity of temporal constraint satisfaction problems