Use std::function to fix unsafe use of llvm::function_ref.
Use std::function to fix unsafe use of llvm::function_ref.

This was exposed by building with a recent version of clang. Without this
change, the following tests were failing:

    Swift(macosx-x86_64) :: IDE/complete_assignment.swift
    Swift(macosx-x86_64) :: IDE/complete_enum_elements.swift
    Swift(macosx-x86_64) :: IDE/complete_stmt_controlling_expr.swift
    Swift(macosx-x86_64) :: SourceKit/CodeComplete/complete_structure.swift

I did not narrow it down to which uses of DeclFilter were problematic.
The global variables certainly do not seem like a good place to use a
function_ref. rdar://problem/28699882

amraboelela/swift,tinysun212/swift-windows,lorentey/swift,frootloops/swift,gribozavr/swift,nathawes/swift,ahoppen/swift,harlanhaskins/swift,nathawes/swift,uasys/swift,JGiola/swift,parkera/swift,codestergit/swift,djwbrown/swift,aschwaighofer/swift,lorentey/swift,codestergit/swift,nathawes/swift,lorentey/swift,frootloops/swift,therealbnut/swift,practicalswift/swift,hughbe/swift,jopamer/swift,JaSpa/swift,tardieu/swift,frootloops/swift,shajrawi/swift,zisko/swift,return/swift,return/swift,roambotics/swift,jopamer/swift,gribozavr/swift,frootloops/swift,deyton/swift,karwa/swift,gottesmm/swift,huonw/swift,jopamer/swift,felix91gr/swift,xwu/swift,huonw/swift,sschiau/swift,djwbrown/swift,djwbrown/swift,OscarSwanros/swift,atrick/swift,parkera/swift,allevato/swift,huonw/swift,gribozavr/swift,zisko/swift,apple/swift,roambotics/swift,tjw/swift,tardieu/swift,glessard/swift,djwbrown/swift,aschwaighofer/swift,parkera/swift,therealbnut/swift,austinzheng/swift,practicalswift/swift,gottesmm/swift,practicalswift/swift,nathawes/swift,JGiola/swift,tkremenek/swift,return/swift,aschwaighofer/swift,tjw/swift,ahoppen/swift,Jnosh/swift,tinysun212/swift-windows,tardieu/swift,brentdax/swift,kstaring/swift,apple/swift,gribozavr/swift,gribozavr/swift,natecook1000/swift,ben-ng/swift,hughbe/swift,danielmartin/swift,manavgabhawala/swift,alblue/swift,manavgabhawala/swift,benlangmuir/swift,rudkx/swift,tkremenek/swift,jtbandes/swift,kperryua/swift,bitjammer/swift,gmilos/swift,huonw/swift,stephentyrone/swift,modocache/swift,shahmishal/swift,milseman/swift,natecook1000/swift,benlangmuir/swift,sschiau/swift,manavgabhawala/swift,bitjammer/swift,jtbandes/swift,karwa/swift,tinysun212/swift-windows,devincoughlin/swift,zisko/swift,gottesmm/swift,therealbnut/swift,parkera/swift,alblue/swift,uasys/swift,ahoppen/swift,nathawes/swift,modocache/swift,gmilos/swift,tardieu/swift,brentdax/swift,hughbe/swift,deyton/swift,aschwaighofer/swift,JGiola/swift,hooman/swift,stephentyrone/swift,apple/swift,kperryua/swift,jckarter/swift,nathawes/swift,therealbnut/swift,deyton/swift,natecook1000/swift,hooman/swift,xwu/swift,OscarSwanros/swift,bitjammer/swift,felix91gr/swift,parkera/swift,rudkx/swift,glessard/swift,natecook1000/swift,roambotics/swift,brentdax/swift,CodaFi/swift,stephentyrone/swift,ben-ng/swift,natecook1000/swift,uasys/swift,ben-ng/swift,ben-ng/swift,harlanhaskins/swift,amraboelela/swift,JaSpa/swift,ahoppen/swift,apple/swift,stephentyrone/swift,CodaFi/swift,OscarSwanros/swift,felix91gr/swift,amraboelela/swift,jmgc/swift,felix91gr/swift,kstaring/swift,brentdax/swift,kperryua/swift,frootloops/swift,calebd/swift,jckarter/swift,glessard/swift,frootloops/swift,rudkx/swift,karwa/swift,gribozavr/swift,harlanhaskins/swift,hooman/swift,arvedviehweger/swift,kstaring/swift,karwa/swift,amraboelela/swift,JaSpa/swift,danielmartin/swift,rudkx/swift,JaSpa/swift,tinysun212/swift-windows,benlangmuir/swift,jopamer/swift,parkera/swift,arvedviehweger/swift,deyton/swift,tkremenek/swift,xedin/swift,jopamer/swift,karwa/swift,kstaring/swift,jtbandes/swift,allevato/swift,karwa/swift,swiftix/swift,OscarSwanros/swift,milseman/swift,return/swift,devincoughlin/swift,practicalswift/swift,CodaFi/swift,kstaring/swift,swiftix/swift,gmilos/swift,return/swift,atrick/swift,benlangmuir/swift,austinzheng/swift,return/swift,atrick/swift,danielmartin/swift,airspeedswift/swift,CodaFi/swift,airspeedswift/swift,xedin/swift,glessard/swift,lorentey/swift,djwbrown/swift,roambotics/swift,gottesmm/swift,shajrawi/swift,tinysun212/swift-windows,alblue/swift,devincoughlin/swift,gmilos/swift,lorentey/swift,devincoughlin/swift,modocache/swift,codestergit/swift,rudkx/swift,allevato/swift,jmgc/swift,glessard/swift,felix91gr/swift,roambotics/swift,arvedviehweger/swift,OscarSwanros/swift,hughbe/swift,kperryua/swift,nathawes/swift,harlanhaskins/swift,karwa/swift,jmgc/swift,bitjammer/swift,sschiau/swift,xwu/swift,tkremenek/swift,apple/swift,JaSpa/swift,natecook1000/swift,danielmartin/swift,benlangmuir/swift,aschwaighofer/swift,harlanhaskins/swift,airspeedswift/swift,stephentyrone/swift,gmilos/swift,danielmartin/swift,frootloops/swift,danielmartin/swift,austinzheng/swift,xedin/swift,sschiau/swift,practicalswift/swift,aschwaighofer/swift,shajrawi/swift,allevato/swift,Jnosh/swift,zisko/swift,felix91gr/swift,gribozavr/swift,sschiau/swift,shajrawi/swift,uasys/swift,shajrawi/swift,kperryua/swift,devincoughlin/swift,arvedviehweger/swift,brentdax/swift,calebd/swift,lorentey/swift,benlangmuir/swift,airspeedswift/swift,stephentyrone/swift,parkera/swift,stephentyrone/swift,apple/swift,manavgabhawala/swift,gregomni/swift,milseman/swift,uasys/swift,uasys/swift,shajrawi/swift,bitjammer/swift,shahmishal/swift,gribozavr/swift,OscarSwanros/swift,gregomni/swift,zisko/swift,CodaFi/swift,jtbandes/swift,hooman/swift,jckarter/swift,Jnosh/swift,zisko/swift,xwu/swift,codestergit/swift,Jnosh/swift,xwu/swift,deyton/swift,milseman/swift,jmgc/swift,manavgabhawala/swift,lorentey/swift,tkremenek/swift,calebd/swift,calebd/swift,tinysun212/swift-windows,gmilos/swift,tardieu/swift,aschwaighofer/swift,modocache/swift,shajrawi/swift,gottesmm/swift,huonw/swift,calebd/swift,amraboelela/swift,jtbandes/swift,devincoughlin/swift,xedin/swift,brentdax/swift,jckarter/swift,shahmishal/swift,JGiola/swift,xwu/swift,gregomni/swift,ben-ng/swift,codestergit/swift,huonw/swift,airspeedswift/swift,Jnosh/swift,harlanhaskins/swift,tinysun212/swift-windows,arvedviehweger/swift,roambotics/swift,kperryua/swift,devincoughlin/swift,codestergit/swift,tjw/swift,felix91gr/swift,calebd/swift,sschiau/swift,jopamer/swift,rudkx/swift,manavgabhawala/swift,deyton/swift,djwbrown/swift,Jnosh/swift,hughbe/swift,harlanhaskins/swift,huonw/swift,jckarter/swift,hughbe/swift,tkremenek/swift,jopamer/swift,sschiau/swift,amraboelela/swift,jmgc/swift,gottesmm/swift,swiftix/swift,jtbandes/swift,practicalswift/swift,arvedviehweger/swift,gottesmm/swift,gregomni/swift,jtbandes/swift,allevato/swift,djwbrown/swift,gregomni/swift,allevato/swift,kstaring/swift,austinzheng/swift,tjw/swift,xedin/swift,gregomni/swift,practicalswift/swift,bitjammer/swift,hooman/swift,kperryua/swift,tjw/swift,tardieu/swift,parkera/swift,JaSpa/swift,xedin/swift,jckarter/swift,manavgabhawala/swift,alblue/swift,milseman/swift,hughbe/swift,austinzheng/swift,JGiola/swift,ben-ng/swift,shahmishal/swift,tjw/swift,austinzheng/swift,OscarSwanros/swift,jmgc/swift,hooman/swift,modocache/swift,allevato/swift,deyton/swift,shajrawi/swift,ahoppen/swift,glessard/swift,therealbnut/swift,ben-ng/swift,CodaFi/swift,practicalswift/swift,sschiau/swift,modocache/swift,swiftix/swift,tardieu/swift,xwu/swift,airspeedswift/swift,airspeedswift/swift,atrick/swift,swiftix/swift,JaSpa/swift,kstaring/swift,lorentey/swift,austinzheng/swift,atrick/swift,CodaFi/swift,danielmartin/swift,modocache/swift,tkremenek/swift,natecook1000/swift,alblue/swift,shahmishal/swift,jmgc/swift,karwa/swift,atrick/swift,therealbnut/swift,Jnosh/swift,xedin/swift,devincoughlin/swift,return/swift,alblue/swift,bitjammer/swift,zisko/swift,calebd/swift,ahoppen/swift,shahmishal/swift,shahmishal/swift,gmilos/swift,therealbnut/swift,xedin/swift,hooman/swift,brentdax/swift,shahmishal/swift,jckarter/swift,tjw/swift,swiftix/swift,amraboelela/swift,milseman/swift,swiftix/swift,uasys/swift,milseman/swift,alblue/swift,JGiola/swift,arvedviehweger/swift,codestergit/swift