Gravar-mail: A model-based approach for analysis of spatial structure in genetic data