The ‘Star Trek’ actor and his daughter, Melanie Shatner Gretsch, dealt with treatment for stage 4 cancer at the same time