Fix for Bug #3085

In `CvANN_MLP::create()` function, code segment

```C++
CV_CALL( weights = (double**)cvAlloc( (l_count+1)*sizeof(weights0) ));
weights[0] = wbuf->data.db;
weights[1] = weights[0] + l_dst[0]*2;
for( i = 1; i < l_count; i++ )
    weights[i+1] = weights[i] + (l_dst[i-1] + 1)*l_dst[i];
weights[l_count+1] = weights[l_count] + l_dst[l_count-1]*2;
```

In the first statement, the `weights` array is only allocated for `l_count+1` elements, but in the last statement, `weights[l_count+1]` element is accessed.