Cleanup linkage computation for static locals.

With this patch we assign VisibleNoLinkage to static locals in inline functions.
This lets us simplify CodeGen a bit.