A police investigation is underway after hearse had its back window smashed while en route to a funeral in Edinburgh.