Bootstrap: use the new VERSION property from 3.2.0 onwards, and improve pattern matching for older versions.

Starting from v3.2.0, Bootstrap adds a VERSION property to its JavaScript components.
So, this change takes care of detecting that, and diversifies the old pattern matching implementation to distinguish between v2 and v3.

I didn't have a reason to try and detect v1, honestly, but I think this is still an improvement.. ;-)

Note that I return ranges instead of a specific version; I don't think that should be a problem, though.