Gravitational waves from two scalar fields unifying the dark sector with inflation