Change 'formsetsort' template filter formset handling

    Tell populated and extra inlines apart by checking whether form
instance primary key is present. Get sorting field value by calling
BoundField.value() rather than checking it's data attribute.