utils:list: Improve remove function
utils:list: Improve remove function

Remove functions was doing unnecessary things to only remove an item from
a linked list. e.g: keeping pointer to the previous element, more "if"
clauses than necessary, ...

Change-Id: I79b44d7915202effac20ea3ade2b1a79f3f4774d
Signed-off-by: Flavio Ceolin <979b9165500b0741b9d0500e2efd74fc1547bff7@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/17515
Reviewed-by: Kishen Maloor <c62ddea3cd661a9268bff15f07fc2229cdc9ac02@intel.com>
Tested-by: Kishen Maloor <c62ddea3cd661a9268bff15f07fc2229cdc9ac02@intel.com>

iotivity/iotivity-constrained,iotivity/iotivity-constrained,iotivity/iotivity-constrained,iotivity/iotivity-constrained