Return error from `softPwmCreate` if `pthread_create` fails
If `pthread_create` fails, `newPin` will never get reset to -1 and process would hang. This change will return from `softPwmCreate` immediately if `pthread_create` returns a non-zero value and avoid hanging forever.