Thousands of mourners in Azerbaijan have turned out for the funeral of magazine editor Elmar Husseinov , who was gunned down earlier in the week .