Applies the same optimisations as are present in the QgsFeature
methods to avoid the overhead of sip's QVariant conversion logic
when attributes are of a basic type
The python `QgsFeature.setAttributes()` calls is relatively slow
because of the call to `sipConvertToType` which needs to make in
intermediate allocation for each attribute QVariant creation.
This change aims to speed up this call by avoiding the call to
`sipConvertToType` for the most common types.
The change itself is quite simple. If the input attribute is a
boolean, an integer, a string or a floating, a QVariant is directly
created by using the python C API instead of calling
`sipConvertToType`.
Based on some testing on lists which can contain between 5 and 10
elements, I have measured an acceleration up up to 70%.