Dark matter search with CUORE-0 and CUORE