Fix assert in bakery_lock_release()

Fixes ARM-software/tf-issues#27

Signed-off-by: Jon Medhurst <tixy@linaro.org>
Fix gicd_set_ipriorityr()

Make gicd_set_ipriorityr() actually write to the priority register.

Also correct callers of this function which want the highest priority
to use the value zero as this is the highest priority value according
to the ARM Generic Interrupt Controller Architecture Specification.

Note, this patch deliberately renames MAX_PRI_VAL so that anyone who
may have copied the buggy FVP code will be alerted to this when
compiling with this fix.

Fixes ARM-software/tf-issues#21

Signed-off-by: Jon Medhurst <tixy@linaro.org>