More powerful Inline Admin `extra` parameter (#19425)

Right now, the number of extra inline forms in inline admins is
not that flexible. It should be  possible to define a method
which can decide the number based on the context.

Issue in question: https://code.djangoproject.com/ticket/19425