Only display card details if the flags are true, and the matching values exist.

The old code would display an empty span if the flags and data didn't line up. For example if the expiry date existed on the payment method, but the flag said not to display it, the span would still get built. This prevents that.

Also do some code cleanup of related lines.
I went the other direction. `$display_parts` has `card_number` as an option, and should work in conjecture with `display_details` like the main `displayInternal()`.

It is a little weird that we have an array of parts, and a flag we pass in, but until someone is willing to rewrite all our code to use the flags, I think this is more logically consistent.