Memory allocations are now done based on contents of SPS
API changed to move allocations inside the library
Also changed strlen to strnlen
Change-Id: I9130457f564cddb4da7ec6399cc9fe88ee871217
Added support to check num_ref_frames in SPS
and num_reorder_frames in VUI before returning error for level
Change-Id: I392bab419385ca239836d200f9f2b064915a8a46