Weir’s self-published first novel was hailed for its deep scientific detail and accuracy but “Hail Mary” trades hard science for a more fantastical plot.