Flexible Models for Microclustering with Application to Entity Resolution