Trac #14800: Implement Pynac->Python callback for function::subs()

This patch lets us optionally change the behavior of `subs()` on
symbolic functions.

URL: http://trac.sagemath.org/14800
Reported by: vbraun
Ticket author(s): Volker Braun
Reviewer(s): Jean-Pierre Flori